1

I am attempting to export data from BigQuery to GCS using code that has previously worked:

logger.log("Exporting BigQuery data for date:" + dayString + "<br/>");

JobConfigurationExtract extractConfig = new JobConfigurationExtract();
extractConfig.setDestinationFormat("NEWLINE_DELIMITED_JSON");
String applicationId = ServerUtils.getApplicationId();
String dataFile = "gs://"+applicationId+"_analytics/" + accountName + "-" + dayString + "-*.json";
extractConfig.setDestinationUri(dataFile);

String tableName = dayString.replaceAll("-","_");
TableReference bigQuerytableToExtractFrom = new TableReference().setProjectId(BigQueryUtils.PROJECT_NUMBER).setDatasetId(getDatasetName(accountName)).setTableId(tableName);

extractConfig.setSourceTable(bigQuerytableToExtractFrom);

JobConfiguration config = new JobConfiguration().setExtract(extractConfig);
Job job = new Job().setConfiguration(config);
Job queuedJob = BigqueryUtils.getClient().jobs().insert(BigQueryUtils.PROJECT_NUMBER, job).execute();


String jobIdString = queuedJob.getJobReference().getJobId();
jobIdString = jobIdString.substring(jobIdString.indexOf(':')+1);

return jobIdString;

However, today the job info always returns:

{"errorResult":{"message":"Unexpected. Please try again.","reason":"internalError"},"errors":[{"message":"Unexpected. Please try again.","reason":"internalError"}],"state":"DONE"}

Is BigQuery having issues today? If so is there an ETA on when it is expected to be fixed?

As per Pentium 10's suggestion, here are a couple failed job ids: job_nGY3gTVibV07Y38PWJRIQ79SxaE, job_lJJBUibG_W42Lrl8Bwux0_RD_yw,

4
  • How would we know the answer to this? Apr 1, 2014 at 20:19
  • 2
    Please add the failed job id. @RobertHarvey there are support guys from Bigquery looking over these Q&As, they will pick it up.
    – Pentium10
    Apr 1, 2014 at 20:25
  • @Pentium10: We'll see. Apr 1, 2014 at 20:26
  • @Robert Harvey - BigQuery's official support forum is now StackOverflow, for better or for worse. I suspect that Google has some sort of deal with StackOverflow to make this happen, but that suspicion is based solely on the fact that Google Cloud tags get special icons. In any case, like Pentium10 is suggesting, I'm hoping that I can get an official response. Apr 1, 2014 at 23:04

1 Answer 1

4

Ah ... the issue is that the table you're trying to export has been written to via streaming import. That doesn't currently work because our export pipeline doesn't know how to read out of the streaming buffers. I've filed a bug.

As a workaround, if you copy the table (via bq cp, via the web UI) it should produce a table that is exportable, although may be missing the last few minutes of data. If you want an absolutely up-to-date version of the table, you can run a select * query with allowLargeResults and a destination table, and then export that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.