Google BigQuery - 使用带有日期分区表的通配符表查询?

时间:2016-10-06 06:27:03

标签: google-bigquery google-cloud-platform

我正在尝试使用通配符表函数来查询一堆日期分区表。

此查询有效:

select * from `Mydataset.fact_table_1` where _partitiontime='2016-09-30' limit 10

此查询不起作用:

select * from `Mydataset.fact_table_*` where _partitiontime='2016-09-30' limit 10

此操作不受支持吗?

如果不支持,那么从多个日期分区表中读取当天数据的最佳方法是什么?

1 个答案:

答案 0 :(得分:1)

以下声明

select * from TABLE_QUERY(YOUR_DATASET,'table_id contains "fact_table_"') where _PARTITIONTIME = TIMESTAMP('2016-09-30')

应该做的伎俩

相关问题