Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8867283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:59:31+00:00 2026-06-14T16:59:31+00:00

Instantiating HttpWebRequest and setting properties values:- HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(https://www.googleapis.com/upload/bigquery/v2/projects/776934660156/jobs); request.Method = POST; request.ContentType

  • 0

Instantiating HttpWebRequest and setting properties values:-

    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("https://www.googleapis.com/upload/bigquery/v2/projects/776934660156/jobs");
    request.Method = "POST";
    request.ContentType = "multipart/related; boundary=xxx";
    request.Headers.Add("Authorization: Bearer " + strAccessToken);//Service Account Access token

Below is the content of HttpWebRequest object. When i pass this request i get an error 400 bad request:-

--xxx
Content-Type: application/json; charset=UTF-8
{
"kind" : "bigquery#job" ,
"Id" : "testJob" ,
"configuration": {
"load": {
"destinationTable": {
"projectId": "776934660156",
"datasetId": "BMSTestDataset",
"tableId": "tblEvents"
},
"fieldDelimiter":"|", 
}
}
}
--xxx
Content-Type: application/octet-stream
ET00000102|MT|50|Hindi|Halla Bol|2008-01-11 00:00:00|0|2007-08-07 15:51:38.240000000|<Genre><code>DRAMA</code></Genre>|<Legends><Actor>83</Actor><Actor>2457</Actor><Actor>1639</Actor><Actor>1151</Actor><Actor>1717</Actor><Actor>1526</Actor><Director>1801</Director><Music>820</Music></Legends>
ET00000103|MT|50|Hindi|Kisse Pyaar Karoon|2009-02-27 00:00:00|0|2007-08-07 17:16:36.443000000|<Genre><code>DRAMA</code></Genre>|<Legends><Actor>228</Actor><Actor>46</Actor><Actor>2539</Actor><Actor>2415</Actor><Actor>44</Actor><Actor>2161</Actor><Actor>2100</Actor><Director>82</Director><Music>2624</Music></Legends>
--xxx--

I didn’t specify schema because the table already exists in BQ dataset. Please help me out, I did a lot of research, but not getting any solution.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:59:32+00:00Added an answer on June 14, 2026 at 4:59 pm

    A few things:

    First, the BigQuery Load configuration should look like this (note the newlines after the Content-type header:

    --xxx
    Content-Type: application/json; charset=UTF-8
    
    {
      'configuration': {
        'load': {
          // Schema, only if necessary
          'schema': {
            'fields': [
              {'name':'f1', 'type':'STRING'},
              {'name':'f2', 'type':'INTEGER'}
            ]
          },
          'destinationTable': {
            'projectId': 'projectId',
            'datasetId': 'datasetId',
            'tableId': 'tableId'
          }
        }
      }
    }
    --xxx
    

    Also, if you want to set the Job ID use the jobReference.jobId parameter (see the BigQuery API load config documentation). Example:

    "jobReference": {
        "jobId": 'SOMESTRINGHERE'
    }
    

    P.S. I think it’s good practice to use a random boundary string, such as:

    var boundary = "------------------------" + DateTime.Now.Ticks;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When Instantiating a class, Windsor by default treats all public properties of the class
I am instantiating a local COM server using CoCreateInstance. Sometimes the application providing the
I am instantiating a .NET COM object and would like to update the ConfigurationManager.AppSettings
I have a strange phenomenon while continuously instantiating a com-wrapper and then letting the
In my code I'm instantiating a legacy Delphi object through a COM interface. This
I am instantiating an alert dialog like so: AlertDialog myAlert = new AlertDialog.Builder(myContext).create(); Is
I am instantiating various objects based on an xml file. To create an object
Is instantiating a .NET SQLConnection object on a per request basis (e.g. in the
I am successfully instantiating/automating Visual Studio using the following code: System.Type t = System.Type.GetTypeFromProgID(VisualStudio.DTE.9.0);
I'm instantiating an autocomplete input for Google Maps API (level 3), like so: var

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.