문제

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,

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top