BigQuery - Integrate Scheduled Queries



Scheduled queries, in addition to being the most intuitive external integration with BigQuery (external because the mechanism relies upon the BigQuery Data Transfer service), can be scheduled from BigQuery Studio.

If you prefer, you can also navigate to "Scheduled Queries" on the sidebar. However, even this page will prompt you to "Create Query" which will take you back to the UI. So, it's best to create and schedule your query from the UI by −

  • Compose query in the SQL workspace.
  • Validate and run the query (a query will only run or be scheduled if it is valid).
  • Choose "Schedule Query" which will open up a drop-down menu.

Once in the "Schedule Query" menu, you must fill in −

  • Name of the query
  • Schedule frequency
  • Start time
  • End time

If you don't fill in an end time, the query will run on its assigned schedule in perpetuity.

Integrate Scheduled Queries

Note − One caveat about scheduled queries is that once they are scheduled, there are certain aspects of the query run parameters (like the user associated with the query) that cannot be changed in the UI.

For this, it is necessary to access scheduled queries either via the BigQuery API or command line.

Advertisements