gpt4 book ai didi

google-bigquery - GBQ : rewrite table with a POST request

转载 作者:行者123 更新时间:2023-12-02 07:44:53 26 4
gpt4 key购买 nike

探索Loading data to GBQ with POST request 我还没有找到如何重写现有表(当前示例将数据附加到现有表或创建新表(如果不存在))。我发现可以使用 Web 控制台来完成此任务,因此我假设有一种方法可以使用 POST 请求来解决此任务。有知道的人吗?

最佳答案

您应该为configuration.load.writeDisposition设置WRITE_TRUNCATE值作业配置属性

configuration.load.writeDisposition string [Optional] Specifies the action that occurs if the destination table already exists.

The following values are supported:
WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result.
The default value is WRITE_APPEND.

Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.

关于google-bigquery - GBQ : rewrite table with a POST request,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43117130/

26 4 0