Luis
Luis

Reputation: 1475

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?

Upvotes: 2

Views: 4819

Answers (2)

AlbertoM
AlbertoM

Reputation: 61

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

Upvotes: 6

Tamir Klein
Tamir Klein

Reputation: 3642

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

Upvotes: 11

Related Questions