【问题标题】:Big query table update from reference CSV file从参考 CSV 文件更新大查询表
【发布时间】:2020-11-10 20:12:49
【问题描述】:

我有一个 BigQuery 表,我想从参考 CSV 文件更新几行的内容。此 CSV 文件已上传到 Google 云存储桶。

【问题讨论】:

  • 欢迎来到 Stack Overflow。请使用tour,阅读what's on-topic,并阅读How to Ask a Good Question。请注意,Stack Overflow 不是编码服务。你应该try to solve your problem first。如果您在某个地方遇到困难,那么最好根据您自己的解决方案尝试在此处提出特定问题。到目前为止,还不清楚是什么阻碍了您解决这个问题?

标签: google-cloud-platform google-bigquery google-cloud-storage


【解决方案1】:

当你使用external table from storage时,你只能读取CSV,不能更新它们。

但是,您可以load you CSV into a BigQuery native tableperform the update with DML,然后是export the table to CSV。仅当您只有一个 CSV 时才有效。

如果您有多个 CSV 文件,您至少可以在需要执行更改的地方打印pseudo column _FILE_NAME to identify the files。但是必须手动或使用以前的解决方案(本机表)执行更改

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-08-09
    • 2021-09-20
    • 2016-01-23
    • 2017-12-15
    • 2013-09-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多