View with options in BigQuery

We have a set of events (log view) that we want to connect to get the current state. To improve performance / cost, we would like to create snapshots (so as not to check all the events in the history, but only from the last snapshot). Logs and snapshots are tables with a date suffix.

This approach works OK in BQ, but we need to manually define the request each time. Is there a way to define a “view” with parameters (for example, dates for querying a range of tables)? Or any plans to do something like this?

I know that there are several topics related to TABLE_RANGE / QUERY in views (for example, Using the TABLE_DATE_RANGE function in Views ). Is there any new information on this?

+7
google-bigquery
source share
2 answers

This is a great feature request, but is currently not supported. Please leave more details at https://code.google.com/p/google-bigquery/issues/list , the BigQuery team takes these requests very seriously!

+2
source share

As a workaround, I wrote a small structure for generating complex queries using speed patterns. Just posted it at https://github.com/softkot/gbq

0
source share

All Articles