Skip to content

Latest commit

 

History

History

bq_runner_on_gcs_trigger

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Google Cloud Platform logo

Run BigQuery Sqls on GCS trigger

Steps:

  • Put your SQL script into the sql directory
  • Create a GCS bucket which will be watched
  • In main.py chagne the TARGET_DATASET and TARGET_TABLE
  • Change and define the set-env-vars environmental variables
  • Deploy the Cloud Functions code with the following command: gcloud functions deploy run_sql_scripts --trigger-resource [bucket] --set-env-vars DATASET=test --runtime python37 --timeout=540s --region=europe-west1 --trigger-event google.storage.object.finalize
  • Google Cloud Storage Triggers