AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Data Studio
1.9K members online now
1.9K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

BigQuery sharded tables

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Our data is stored in daily sharded tables (i.e table_name_YYYMMDD).

 

When I put a date filter on a graph I created, will the query run only against the relevant tables for the specified dates, or will it scan all the tables and only then filter according to the relevant date?

 

this can have a significant effect ton performance and more importantly on costs.

BigQuery sharded tables

Explorer ✭ ☆ ☆
# 2
Explorer ✭ ☆ ☆

Since Data Studio can only reference a single table at a time, I don't think your daily tables will change as you adjust the date range. What I've done previously is join all of the dates, thus creating a table spanning several years. You can set a default date range so you only see current month/year/anything. Are you able to join all of your tables on Big Query?

BigQuery sharded tables

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

actually when selecting tables from BQ I was able to select table_name_YYYMMDD which query all the sharded tables. I have looked into the logs of BQ to see which queries data studi does when filtering by date range, and indeed it seems that it is only querying the relevant tables and not all of the tables with that prefix, which is what I was hoping for