This topic was covered for tableau here:
How to query a partitioned table in BigQuery from Tableau
but I don't think you can insert parameters into datastudio yet.
When creating Data Sources you have option to create a custom query, and also opt for Legacy/Standard SQL.

You can use a custom query for your connection to BigQuery. Rather than picking a specific table, provide a query such as:
SELECT *, _PARTITIONTIME AS timestamp
FROM YourPartitionedTable;
Support for standard SQL with this connector was recently launched, and although I can't seem to find a documentation page, it should be possible to enable for the query as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With