How do I Authenticate a Service Account to Make Queries against a GDrive Sheet Backed BigQuery Table?

后端 未结 4 2043
野趣味
野趣味 2021-01-14 12:45

My situation is as follows:

Google Account A has some data in BigQuery.

Google Account B manages Account A\'s BigQuery data, and has also been given editor p

4条回答
  •  伪装坚强ぢ
    2021-01-14 12:51

    For those of you trying to do this via Airflow or Google Cloud Composer, there are two main steps you'll need to do to accomplish this.

    1. Grant view access to the spreadsheet to the project_name@developer.gserviceaccount.com. This should be the same service account you're using to access Google BigQuery. This can be done in the Sheets GUI or programmatically.

    2. Add the following scope to your Google Cloud Connection in Airflow:

    You will then be able to query external tables that reference Google Sheets.

提交回复
热议问题