我一直在尝试使用python google-cloud软件包from google.cloud import bigquery
。
我观察到的是,它拒绝插入很少的行说
[{u'debugInfo': u'', u'reason': u'invalid', u'message': u'no such field.', u'location': u'user.new_user'}]}]
但是,我可以在架构table.schema
[(u'USER', u'record', u'NULLABLE', None, (SchemaField(u'new_user', u'string', u'NULLABLE', None, ())))]
是因为,我正在尝试流媒体&比BigQuery文档中提到的更新速度更新?
我试图在终端上运行相同的操作,但这没有错误。当我尝试以更高的速度流式传输时,这种情况正在发生。
目前,我正在使用AS
self.bigquery_client.create_rows_json(table, batched_event,retry=bigquery.DEFAULT_RETRY.with_deadline(10),skip_invalid_rows=True, ignore_unknown_values=True)
如果您在使用流中修改架构,则流系统不会立即拾取模式更改。更多信息:
https://cloud.google.com/bigquery/troubleshooting-errors#metadata-errors-for-streaming-interts-interts