PROFESSIONAL-DATA-ENGINEER · Question #139
You have enabled the free integration between Firebase Analytics and Google BigQuery. Firebase now automatically creates a new table daily in BigQuery in the format app_events_YYYYMMDD. You want to…
Legacy SQL in BigQuery uses the TABLE_DATE_RANGE function to query across multiple date-sharded tables by specifying a date range and table prefix.
Question
Options
- AUse the TABLE_DATE_RANGE function
- BUse the WHERE_PARTITIONTIME pseudo column
Why each option
Legacy SQL in BigQuery uses the TABLE_DATE_RANGE function to query across multiple date-sharded tables by specifying a date range and table prefix.
The _PARTITIONTIME pseudo column is a Standard SQL feature used to filter rows within a single date-partitioned table; it is not applicable to Legacy SQL or to the date-sharded table pattern used by Firebase BigQuery exports.
Concept tested: Legacy SQL TABLE_DATE_RANGE for date-sharded table queries
Source: https://cloud.google.com/bigquery/docs/reference/legacy-sql#table_date_range
Topics
Community Discussion
No community discussion yet for this question.