1
votes

I want to load data in Big Query using POST request.Getting 404 error. Please suggest where i am going wrong?

headers:

  Authorization: Bearer xxxxx
  Content-Type : multipart/related; boundary=foo_bar_baz
  scope: https://www.googleapis.com/auth/bigquery

https://www.googleapis.com/upload/bigquery/v2/projects/demo_project/jobs?uploadType=multipart HTTP/1.1

        --foo_bar_baz
        Content-Type: application/json; charset=UTF-8

        {
          "configuration": {
            "load": {
              "sourceFormat": "NEWLINE_DELIMITED_JSON",
              "schema": {
                "fields": [
                  {"name": "username", "type": "STRING"},
                  {"name": "password", "type": "INTEGER"}
                ]
              },
              "destinationTable": {
                "projectId": "universal-torch-116906",
                "datasetId": "demo_project",
                "tableId": "test_table"
              }
            }
          }
        }
        --foo_bar_baz
        Content-Type: application/octet-stream

        {"username":"Kutubuddin","password":123}
        --foo_bar_baz--
1
You have a low rate. Important on SO, you have to mark accepted answers by using the tick on the left of the posted answer, below the voting. This will increase your rate. See how this works by visinting this link: meta.stackoverflow.com/questions/5234/… - Pentium10

1 Answers

3
votes

The issue is resolved. Removed HTTP/1.1 from URL.