Note that there are some explanatory texts on larger screens.

plurals
  1. POBigQuery - BackEnd error when loading from JAVA API
    primarykey
    data
    text
    <p>I'm getting 503 - Backend error when trying to set up a load job using JAVA API.</p> <p>The file I am trying to load is on Google Cloud Storage, and if I try to load the data from BigQuery web interface, telling that I want to load from Google Cloud Storage, everything works.</p> <p>Probably there is something wrong with how I use APIs.</p> <p>Here is the code:</p> <pre><code> String url = "[GOOGLE_CLOUD_STORAGE_URL]; Job job = new Job(); JobConfiguration config = new JobConfiguration(); JobConfigurationLoad loadConfig = new JobConfigurationLoad(); config.setLoad(loadConfig); job.setConfiguration(config); List&lt;String&gt; sources = new ArrayList&lt;String&gt;(); sources.add("gs://" + url); loadConfig.setSourceUris(sources); TableReference tableRef = new TableReference(); tableRef.setDatasetId("Foo"); tableRef.setTableId("Bar"); tableRef.setProjectId(PROJECT_ID); loadConfig.setDestinationTable(tableRef); List&lt;TableFieldSchema&gt; fields = new ArrayList&lt;TableFieldSchema&gt;(); TableFieldSchema field = new TableFieldSchema(); ..... A LOT OF FIELDS field.setName("real_dollars_balance"); field.setType("float"); fields.add(field); TableSchema schema = new TableSchema(); schema.setFields(fields); loadConfig.setSchema(schema); Insert insert = bigquery.jobs().insert(PROJECT_ID, job); insert.setProjectId(PROJECT_ID); JobReference jobId = insert.execute().getJobReference(); </code></pre> <p>I can't get a valid Job reference as the insert operation fails, I don't see any new job on BigQuery. I'm correctly authenticated on BigQuery, I can browse data sets and tables. Do I miss something?</p> <p>EDIT - The "execute()" method call throws an exeption, GoogleJsonResponseException, containing this:</p> <pre><code>com.google.api.client.googleapis.json.GoogleJsonResponseException: 503 Service Unavailable { "code" : 503, "errors" : [ { "domain" : "global", "message" : "Backend Error", "reason" : "backendError" } ], "message" : "Backend Error" } </code></pre> <p>And, well, it never becomes "available". I really don't know what I am missing. How you people set automatic procedure to load data on Google BigQuery? The docs on Google is not clear like I expected for a service like this.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload