[英]Overwrite and append big query table from csv file
I have an existing bq table with date, stock id and stock price columns.我有一个包含日期、股票 ID 和股票价格列的现有 bq 表。 Using bq load, I can either overwrite or append data from csv file.
使用 bq load,我可以覆盖 csv 文件中的 append 数据。 Using csv file,
使用 csv 文件,
In that scenario you would want to to a two step process.在那种情况下,您可能需要一个两步过程。
MERGE
statement, and define the when matched and not matched criteria as you needed.MERGE
语句,并根据需要定义匹配条件和不匹配条件。 Documentation on the MERGE
statement can be found here: https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#merge_statement关于
MERGE
语句的文档可以在这里找到: https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#merge_statement
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.