【发布时间】:2018-08-08 19:04:39
【问题描述】:
我有一个外部 Sheets 表,我想通过 Airflow 中的 BigQueryOperator 进行查询。
我更喜欢使用 Cloud Composer 服务帐号。
我通过 Airflow UI 使用以下参数创建了一个新连接:
Conn Id: bigquery_with_gdrive_scope
Conn Type: google_cloud_platform
Project Id: <my project id>
Keyfile path: <none>
Keyfile JSON: <none>
Scopes: https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/drive
在我的 DAG 中,我使用:BigQueryOperator(..., bigquery_conn_id='bigquery_with_gdrive_scope')
日志报告:Access Denied: BigQuery BigQuery: No OAuth token with Google Drive scope was found.
任务属性显示:bigquery_conn_id bigquery_with_gdrive_scope
就好像bigquery_conn_id 参数被忽略了一样。
【问题讨论】: