简体   繁体   English

是否可以从 BigQuery 表中删除 Partition filter=Required 设置?

[英]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 .我已经存在具有Partition filter=Required设置的表我想禁用它以便我可以在表上运行查询而不必在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:是的,您可以使用ALTER 命令来更改您的表,如下所示:

#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如果需要,您可以使用相同的命令将require_partition_filter更改回 true

I couldn't do it with ALTER TABLE, but in the cloud shell, this command worked for me:我无法使用 ALTER TABLE 执行此操作,但在云 Shell 中,此命令对我有用:

bq update --require_partition_filter=FALSE your_project_id:dataset.table_name

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 选择需要对分区列进行过滤的 Bigquery 表的最新分区 - choose latest partition of a Bigquery table where filter over partition column is required 使用 require_partition_filter 列出 BigQuery 分区表中的所有分区 - Listing all the partitions from BigQuery partitioned table with require_partition_filter bigquery:从查询结果创建分区表不会分区旧时间戳 - bigquery: create partitioned table from query results does NOT partition old timestamps 将 CSV 个文件上传到分区的 bigquery 表中(根据文件名生成分区) - Upload CSV files into partitioned bigquery table (generate partition from file name) BigQuery 分区表(当天)不分区 - python - BigQuery Partitioned Table (on DAY) it does not partition - python 来自子查询的 BigQuery 日期分区条件 - BigQuery date partition condition from subquery 可以在 BigQuery 中以原子方式将数据从一个表移动到另一个表吗? - Possible to atomically move data from one table to another in BigQuery? 如何在 BigQuery 表中选择最新的分区? - How to choose the latest partition in BigQuery table? 使用带有 BigQuery 中任何可能内容的字符串进行过滤 - Filter using string with any possible content in BigQuery 当表进入 Firebase 分析分区表时,在 Bigquery 中安排查询 - Schedule a query in Bigquery when a table come in Firebase Analytics Partition table
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM