Google BigQuery - using a wildcard query with a split date section?

I am trying to use wildcard functions to query a bunch of tables by date.

This request works:

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

This request does not work:

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

Is this operation not supported?

If the best way to read data from one day from multiple tables by date is not supported?

+4
source share
1 answer

The following statement

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

Gotta do the trick

+1
source

Source: https://habr.com/ru/post/1656898/


All Articles