Is it possible to remove the Partition filter=Required setting from BigQuery table?

后端 未结 2 1178
夕颜
夕颜 2020-12-22 08:13

I have existed table with setting of Partition filter=Required I want to disable it so I can run queries on the table without having to specify the partition c

相关标签:
2条回答
  • 2020-12-22 08:33

    I couldn't do it with ALTER TABLE, but in the cloud shell, this command worked for me:

    bq update --require_partition_filter=FALSE your_project_id:dataset.table_name
    
    0 讨论(0)
  • 2020-12-22 08:54

    Is it possible or must I create a new table and copy data to it?

    Yes, You can use an ALTER command to alter your table as follow:

    #standardSQL
    ALTER TABLE IF EXISTS mydataset.newtable
    SET OPTIONS(
        require_partition_filter = false
    )
    

    You can change the require_partition_filter back to true if needed using the same command

    0 讨论(0)
提交回复
热议问题