Reputation: 1583
bq load --max_bad_records=1000000 --format=json install.$date gs://production_data/install/install_$date.json.gz ./schema.json
Error:
BigQuery error in load operation: Error processing job 'xxxxxxxxxxxxx:job_c4932fa55c304c9f88224595071f1e17': Unexpected. Please try again.
bq show -j isn't any more helpful with the error message.
"status": {
"errorResult": {
"message": "Unexpected. Please try again.",
"reason": "internalError"
},
"errors": [
{
"message": "Unexpected. Please try again.",
"reason": "internalError"
}
],
"state": "DONE"
}
What's going wrong?
Upvotes: 1
Views: 1188
Reputation: 26617
You're importing the data as CSV, not json. This is due to a confusing flag in the bq tool: --format
is the format of the output. You should use --source_format=json
instead.
I've filed two internal bugs: One that the format/source_format flags are too easy to confuse, the other that we should give a better error when the format of the data doesn't match the format that was specified.
Upvotes: 1