如何使用apache气流计划谷歌云bigquery存储过程

Mik*_*ke 0 google-bigquery airflow google-cloud-composer

我想在 apache airflow 中安排一个 google cloud bigquery 存储过程。我没有在气流中看到任何文档。我应该使用哪个调度程序在 apache airflow 上调度 bigquery 存储过程。你能给我看一些例子吗?太感谢了。

https://airflow.apache.org/docs/apache-airflow-providers-google/stable/operators/cloud/bigquery.html#execute-bigquery-jobs

Jos*_*ell 5

BigQueryInsertJobOperator应该是在 DAG 中使用的运算符,用于在 BigQuery 中执行 SQL(这是您在调用存储过程时要执行的操作)。

例如:

call_stored_procedure = BigQueryInsertJobOperator(
    task_id="call_stored_procedure",
    configuration={
        "query": {
            "query": "CALL `project_id.dataset.stored_procedure_name`(arg1, arg2); ",
            "useLegacySql": False,
        }
    },
    location=location,
)

Run Code Online (Sandbox Code Playgroud)