I have a query that I want to run every day, but the results need to be populated to a new table each day due to the amount of data each table will contain (~10B rows/day).
Essentially want to write to a new table like: my_database_name.my_table_name.my_results_{today's_date}
each day.
I see the feature that allows creating a "Scheduled Query" but don't see any option to write to a new table each day.
Is this possible to do in BigQuery? How can I achieve this?
CodePudding user response:
You can use query parameters to achieve this:
my_database_name.my_table_name.my_results_{run_date}
More detail can be found here: https://cloud.google.com/bigquery/docs/scheduling-queries#available_parameters_2