BigQuery经常以含糊不清的
结束bq load
Waiting on <jobid> ... (68s) Current status: DONE
BigQuery error in load operation: Error processing job
'<jobid>': Too many errors
encountered. Limit is: {1}.
当我bq --format=prettyjson show -j <jobid>
找出错误时,我得到:
"status": {
"errorResult": {
"message": "Too many errors encountered. Limit is: {1}.",
"reason": "invalid"
},
"errors": [
{
"message": "Too many errors encountered. Limit is: {1}.",
"reason": "invalid"
}
],
"state": "DONE"
},
这通常表明bq
不喜欢有关数据结构的内容。
但我怎样才能找出问题所在?哪个行或列bq
退出时出错?
显然,有时,bq
返回&#34;失败详细信息&#34;,其中说明哪个列和行导致错误。但我无法复制这些细节。它们在同一个实例,数据和命令上看起来是任意的。
我在bq help load
中找到了一些让数据通过的选项:
--[no]autodetect: Enable auto detection of schema and options for formats that are not self
describing like CSV and JSON.
--[no]ignore_unknown_values: Whether to allow and ignore extra, unrecognized values in CSV or
JSON import data.
--max_bad_records: Maximum number of bad records allowed before the entire job fails.
(default: '0')
(an integer)
它们允许删除错误值,但可能会丢失许多行。我无法找到bq
返回丢弃行数的位置。