【问题标题】:Is there a way to partition a table created from a query in BigQuery?有没有办法对从 BigQuery 中的查询创建的表进行分区?
【发布时间】:2016-12-13 05:06:58
【问题描述】:

在 BigQuery 中,我可以根据查询创建一个永久表。有没有办法让这样的表按日期分区?我可以查询日期分区表,但无法从查询中创建日期分区表。

例如,给定一个日期分区表tbl

select col from tbl
where _partitiontime between cast('YYYY-MM-DD' as timestamp) and cast('YYYY-MM-DD' as timestamp)

产生一个非日期分区表。

【问题讨论】:

    标签: google-bigquery google-cloud-platform


    【解决方案1】:

    要创建分区表,您必须在创建时通过command-lineAPI 将表声明为已分区。这些是我们今天唯一的选择。查看更多关于Creating and Updating Date-Partitioned Tables

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-03-04
      • 2023-01-20
      • 1970-01-01
      • 1970-01-01
      • 2019-10-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多