How to share an authorized BigQuery view that queries other views from other datasets?

Viewed 1192

I have a bigquery view that I want to share with data analysts so that they can access its data through data studio. This shared view makes a query to a private view in another dataset which in turn makes a query to a table in another dataset, as per this diagram :

enter image description here

To achieve this, I followed the steps as mentioned in the tutorial Creating an authorized view

  • Assign the data analysts to the project-level bigquery.user role in IAM
  • Authorize the shared_view on the private_dataset_1
  • Authorize the data analysts group to access the shared_dataset with the BigQuery Data Viewer role

However, querying the shared_view from a data analyst account keeps failing because of insufficient permissions access..

1 Answers

To resolve this issue it is also necessary to share the private datasets accessed by the private view with this view, so that each private dataset in the chain is explicitly shared with views external to it that access it.

In this case, it is necessary to authorize the private_view_1 on the private_dataset_2.

Related