【发布时间】:2016-09-01 09:05:19
【问题描述】:
这是我遇到问题的代码部分。
table_data_insert_all_request_body = {
"kind": "bigquery#tableDataInsertAllRequest",
"skipInvalidRows": True,
"ignoreUnknownValues": True,
"templateSuffix": 'suffix',
"rows": [
{
"json": {
("one"): ("two"),
("three"): ("four")
}
}
]
}
request = service.tabledata().insertAll(projectId=projectId, datasetId=datasetId, tableId=tableId, body=table_data_insert_all_request_body)
response = request.execute()
如果我打印响应,我会得到响应:
{u'kind': u'bigquery#tableDataInsertAllResponse'}
我可以评估项目、数据集甚至表格,但我无法更新表格中的值。我需要做些什么不同的事情?显然我不想输入两个值,但我无法上传任何内容。一旦我可以上传一些东西,我就可以让行正常工作。
【问题讨论】:
-
您能提供您的表架构吗?我觉得你这里给出的json数据格式不正确。
标签: python json python-2.7 google-bigquery