简体   繁体   中英

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

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 column in the WHERE .

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM