咨询:iOS/Android应用Firebase日内事件BigQuery数据源在Data Studio无需每日重加的方法
Great question—dealing with those rolling app_events_intraday_YYYYMMDD tables can be a total hassle when you’re stuck reconfiguring Data Studio dashboards every day. Here are three reliable solutions to automate this and stop the manual work:
1. Use a BigQuery View with Wildcard Tables
This is the simplest fix, and it lets you set up a single Data Studio source that automatically includes new daily tables.
- How to do it:
- Go to your BigQuery project, navigate to the dataset containing your Firebase intraday tables.
- Create a new View.
- Use a wildcard table query to include all intraday tables, like this:
Pro tip: Instead ofSELECT * FROM `your-project-id.your-dataset-id.app_events_intraday_*`SELECT *, list specific fields you need (e.g.,event_name,user_id,timestamp_micros) if your Firebase event schema might change—this prevents the view from breaking if new fields are added or removed. - Save the view, then connect it to Data Studio as your data source.
From now on, every new app_events_intraday_YYYYMMDD table will automatically be included in the view. Just refresh your Data Studio dashboard, and the new data will show up without any manual reconfiguration.
2. Schedule a BigQuery Query to Merge Intraday Data into a Single Table
If you prefer having a consolidated table (for better query performance or historical tracking), set up a scheduled query to append daily intraday data to a permanent table.
- How to do it:
- Create a new permanent table in BigQuery (e.g.,
app_events_combined) with the same schema as your intraday tables. - Write a query to append the previous day’s intraday data to this table:
INSERT INTO `your-project-id.your-dataset-id.app_events_combined` SELECT * FROM `your-project-id.your-dataset-id.app_events_intraday_${FORMAT_DATE("%Y%m%d", DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY))}` - Schedule this query to run daily (e.g., every morning at 2 AM, after the previous day’s intraday table is fully populated).
- Connect Data Studio to the
app_events_combinedtable.
- Create a new permanent table in BigQuery (e.g.,
This way, your consolidated table grows automatically each day, and Data Studio always pulls from a single, up-to-date source.
3. Use a Custom Wildcard Query Directly in Data Studio
You can skip creating a BigQuery view entirely by using a custom query when setting up your Data Studio data source.
- How to do it:
- In Data Studio, add a new BigQuery data source.
- Select the "Custom query" option instead of picking a specific table.
- Paste in the same wildcard query from the first solution:
SELECT * FROM `your-project-id.your-dataset-id.app_events_intraday_*` - Save the data source.
Data Studio will recognize all tables matching the wildcard pattern, and new daily tables will be included automatically when you refresh your dashboard. Note that some advanced Data Studio features might have limited support for wildcard queries, so test this with your specific dashboard setup first.
Recommendation
For most cases, the BigQuery View approach is the best bet—it’s low-effort, requires no scheduling, and keeps your Data Studio setup clean.
内容的提问来源于stack exchange,提问作者KimHafr

