在将数据流式传输到 BigQuery 时,如果 table 已经存在,是否将数据附加到 table 或覆盖它

Is data appended to a table or overwrite it if the table has existed already when streaming data into BigQuery

streaming data into a BigQuery table, I wonder if the default is to append the json data to a BigQuery table if the table has existed already? The api documentation for tabledata().insertAll() is very brief and doesn't mention parameters like configuration.load.writeDisposition 在加载作业中时。

这里没有多选,所以没有默认和覆盖的情况。不要忘记 BigQuery 是一项 WORM 技术(设计为仅附加)。它寻找我,你不知道这个东西,因为没有像 UPDATE.

这样的选项

你只需要设置路径参数,project, dataset, table ID,
然后将现有架构设置为 json 和行,它将附加到 table.

为了帮助确保数据一致性,您 can supply insertId 为每个插入的行。 BigQuery 会记住此 ID 至少一分钟。如果您尝试在该时间段内流式传输同一组行并且设置了 insertId 属性,则 BigQuery 会使用 insertId 属性 尽最大努力删除重复数据。

如果出现错误,您会得到一个简短的错误代码来总结错误。有关调试您收到的具体原因值的帮助,请参阅 troubleshooting errors

还值得一读:

  • Bigquery internalError when streaming data