【问题标题】:When is the feature of partitioning on integer column available in BIGQUERY table?BIGQUERY 表中的整数列分区功能何时可用?
【发布时间】:2025-12-25 17:40:11
【问题描述】:

我们知道 Google 何时会在 BIGQUERY 表的整数列上启用分区吗?我们可以在创建 BIGQUERY 表后对其进行分区,还是必须在创建 BIGQUERY 表的同时对其进行分区?

非常感谢。

【问题讨论】:

    标签: google-bigquery


    【解决方案1】:

    所谓的Integer range partitioned tables 已经作为预发布状态的 Beta 版提供

    表在创建过程中必须设置为分区,如下例所示

    CREATE TABLE `project.dataset.table`
    PARTITION BY RANGE_BUCKET(customer_id, GENERATE_ARRAY(0, 100, 10)) AS 
    SELECT 1 AS customer_id, DATE '2019-10-01' AS day  
    

    Creating and using integer range partitioned tables查看更多详情

    【讨论】:

    • 当然。如果有帮助,也考虑投票给答案 - 这对 SO 来说同样重要:o)