我尝试使用bq cli将数据加载到表中,但我不断收到以下错误:
========================================
== Platform ==
CPython:2.7.6:Linux-3.13.0-29-generic-x86_64-with-Ubuntu-14.04-trusty
== bq version ==
v2.0.14
== Command line ==
['/usr/local/bin/bq', '--service_account', 'xxx@developer.gserviceaccount.com', '--service_account_private_key_file', 'keyfile.p12', '--service_account_credential_file', '../.bigquery.v2.token', 'load', 'xxxxxxxx', '/home/xxx/yyyy.csv.gz', '/home/xxx/schema.json']
== UTC timestamp ==
2014-08-19 17:42:05
== Error trace ==
File "build/bdist.linux-x86_64/egg/bq.py", line 769, in RunSafely
return_value = self.RunWithArgs(*args, **kwds)
File "build/bdist.linux-x86_64/egg/bq.py", line 1003, in RunWithArgs
job = client.Load(table_reference, source, schema=schema, **opts)
File "build/bdist.linux-x86_64/egg/bigquery_client.py", line 1740, in Load
upload_file=upload_file, **kwds)
File "build/bdist.linux-x86_64/egg/bigquery_client.py", line 1452, in ExecuteJob
job_id=job_id)
File "build/bdist.linux-x86_64/egg/bigquery_client.py", line 1437, in RunJobSynchronously
upload_file=upload_file, job_id=job_id)
File "build/bdist.linux-x86_64/egg/bigquery_client.py", line 1431, in StartJob
projectId=project_id).execute()
File "build/bdist.linux-x86_64/egg/bigquery_client.py", line 279, in execute
return super(BigqueryHttp, self).execute(**kwds)
File "build/bdist.linux-x86_64/egg/oauth2client/util.py", line 120, in positional_wrapper
return wrapped(*args, **kwargs)
File "build/bdist.linux-x86_64/egg/apiclient/http.py", line 656, in execute
_, body = self.next_chunk(http=http)
File "build/bdist.linux-x86_64/egg/oauth2client/util.py", line 120, in positional_wrapper
return wrapped(*args, **kwargs)
File "build/bdist.linux-x86_64/egg/apiclient/http.py", line 733, in next_chunk
raise ResumableUploadError("Failed to retrieve starting URI.")
========================================
Unexpected exception in load operation: Failed to retrieve starting URI.
我的帐户启用了结算功能,我可以使用bq cli进行查询(其他加载)。
答案 0 :(得分:1)
我找到了另一篇文章的答案。我错过了" --project_id"参数。对于任何维护者(尽管我自己都在考虑这样做),改进错误信息可能是一个好主意......