Prabu
Prabu

Reputation: 11

GCP Bigquery Schedule on quarterly basis

I have a query and I wanted to schedule it as quarterly basis.

For example, first quarter of calendar is Jan 2022 - Mar 2022 and so I wanted to run this query on 01 Mar 2022. Is there anyway we can do that ?

Any help will be highly appreciated.

Many thanks.

Upvotes: 0

Views: 329

Answers (2)

Pratik Patil
Pratik Patil

Reputation: 832

Option1: Using some programmatic api like python/go/java for bigquery to call your query and schedule through some cron on backend/GCE box.

Option2: If you do not want to use some programatic api to do it on some cron job: Bigquery native UI now does support scheduled queries. You can schedule your query through it. Screenshot below: enter image description here

Option3: If you have many of such queries which you want to run on some cadence you can either go: Airflow OR even better option: https://potens.io/products/#magnus

Upvotes: 2

Damião Martins
Damião Martins

Reputation: 1849

BigQuery uses the cron sintax of AppEngine (see docs) for custom schedules, so if want run a query every "1 Mar", you can set the "Repeats" option to "Custom" and the "Custom Schedule" as below:

1 of mar 00:00

To schedule multiple months, you can use a comma-separated list:

1 of mar,jun,sep,dec 00:00

Upvotes: 3

Related Questions