通过命令行在 BigQuery 中加载数据时出错:已更新
Posted
技术标签:
【中文标题】通过命令行在 BigQuery 中加载数据时出错:已更新【英文标题】:Error while loading data in BigQuery via command line : Updated 【发布时间】:2012-08-02 05:38:30 【问题描述】:使用脚本运行了一个通宵工作。 它适用于很多桌子,然后大约 4 小时后早上 7 点 IST 大约开始表现得很奇怪 现在即使是单个命令也会出现同样的错误
bq load --max_bad_records=10 tbl163.a_V3_14Jun2012 a_V3_14Jun2012.log.gz ../schema/analyze.schema
错误:
BigQuery error in load operation: Could not connect with BigQuery server, http
response status: 502
更新:我刚刚收到以下错误
You have encountered a bug in the BigQuery CLI. Please send an email to bigquery- team@google.com to report this, with the following information:
========================================
== Platform ==
CPython:2.7.3:Linux-3.2.0-25-virtual-x86_64-with-Ubuntu-12.04-precise
== bq version ==
v2.0.6
== Command line ==
['/usr/local/bin/bq', 'load', '--max_bad_records=10', 'vizvrm299.analyze_VIZVRM299_26Jun2012', 'analyze_VIZVRM299_26Jun2012.log.gz', '../schema/analyze.schema']
== Error trace ==
File "build/bdist.linux-x86_64/egg/bq.py", line 614, in RunSafely
self.RunWithArgs(*args, **kwds)
File "build/bdist.linux-x86_64/egg/bq.py", line 791, in RunWithArgs
job = client.Load(table_reference, source, schema=schema, **opts)
File "build/bdist.linux-x86_64/egg/bigquery_client.py", line 1473, in Load
upload_file=upload_file, **kwds)
File "build/bdist.linux-x86_64/egg/bigquery_client.py", line 1228, in ExecuteJob
job_id=job_id)
File "build/bdist.linux-x86_64/egg/bigquery_client.py", line 1214, in RunJobSynchronously
upload_file=upload_file, job_id=job_id)
File "build/bdist.linux-x86_64/egg/bigquery_client.py", line 1208, in StartJob
projectId=project_id).execute()
File "build/bdist.linux-x86_64/egg/bigquery_client.py", line 184, in execute
return super(BigqueryHttp, self).execute(**kwds)
File "build/bdist.linux-x86_64/egg/apiclient/http.py", line 644, in execute
_, body = self.next_chunk(http)
File "build/bdist.linux-x86_64/egg/apiclient/http.py", line 708, in next_chunk
raise ResumableUploadError("Failed to retrieve starting URI.")
========================================
Unexpected exception in load operation: Failed to retrieve starting URI.
【问题讨论】:
在我的情况下,当我有错误的架构时,我看到了这个错误消息。我没有提到“整数”,而是将类型称为“int”。这似乎是一个错误,因为它报告了错误的错误。 【参考方案1】:只是为了结束这个问题,你还在观察这些错误吗?这看起来像是网络配置问题,而不是 bq 命令行工具的直接问题。但是,AFAIK, bq 不提供在网络出现问题时恢复工作插入的功能。
【讨论】:
第二个错误说你在 BigQuery CLI 中遇到了一个错误。请发送电子邮件至 bigquery-team@google.com 报告此情况,并提供以下信息:以上是关于通过命令行在 BigQuery 中加载数据时出错:已更新的主要内容,如果未能解决你的问题,请参考以下文章