如何通过 CLI 将 CSV(按列名分区)从云存储上传到 BigQuery?
how to upload a CSV(partitioned by a column name) from cloud storage to BigQuery via CLI?
我想通过 CLI.For 示例将 CSV 文件(按列名分区)上传到 bigquery:table 应该按名为 "Time-Key" 的列名分区。
这是我当前的代码:
bq load \
--source_format=CSV \
{prjectname:Datasetname.tablename} \
{cloud storage path for csv file} \
./{SchemaNames.json}
如何向其中添加分区参数? (例如:分区 TIME_KEY)
来自文档:
--time_partitioning_field
The field used to determine how to create a time-based partition. If time-based partitioning is enabled without this value, the table is partitioned based on the load time.
https://cloud.google.com/bigquery/docs/reference/bq-cli-reference#bq_load
我想通过 CLI.For 示例将 CSV 文件(按列名分区)上传到 bigquery:table 应该按名为 "Time-Key" 的列名分区。 这是我当前的代码:
bq load \
--source_format=CSV \
{prjectname:Datasetname.tablename} \
{cloud storage path for csv file} \
./{SchemaNames.json}
如何向其中添加分区参数? (例如:分区 TIME_KEY)
来自文档:
--time_partitioning_field
The field used to determine how to create a time-based partition. If time-based partitioning is enabled without this value, the table is partitioned based on the load time.
https://cloud.google.com/bigquery/docs/reference/bq-cli-reference#bq_load