LoginSignup
0
0

Dataform on Big Query, Federated Query, Cloud SQL, Connection error: Access Denied

Posted at

When you execute workflow that uses federated query on dataform, fail:

reason:"invalidQuery" location:"query" message:"Access Denied: Connection 'your_conn': User does not have bigquery.connections.use permission for connection 'your_conn'. 

What's confusing most is when you run *.sqlx indivisually from editor right side above, does NOT cause error but run correctly and can get data.

This happens following this official instruction.
https://cloud.google.com/dataform/docs/required-access#grant_required_roles_to_a_service_account_used_in

They said you need to give these roles for Dataform Service Account.

  • BigQuery Job User
  • BigQuery Data Editor
  • BigQuery Data Viewer

However, if you want to access Cloud SQL using federated query, Another role needed.

  • bigquery.connections.use

It is written here.
https://cloud.google.com/bigquery/docs/cloud-sql-federated-queries

cf.
https://zenn.dev/snagasawa/articles/9d4d0d7369880f#%E5%A4%96%E9%83%A8%E3%83%AA%E3%82%BD%E3%83%BC%E3%82%B9

あまり日本語英語ともに情報がなかったので、英語で書きました。いつか検索に引っかかって誰かのためになりますように。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0