Google Professional Data Engineer Question 198
Single answerGoogle Cloud PlatformYour organization wants to share a dataset stored in BigQuery with an external partner organization. The partner should only have read access to a specific table within the dataset. You also need to ensure that the partner organization can access the data securely without requiring them to create a Google Cloud account. Which approach should you use?
- A
Grant the partner organization the 'roles/bigquery.dataViewer' role at the dataset level.
- B
Use a service account and authenticate the partner via a signed URL for table access.
- C
Use BigQuery's authorized views to create a view for the specific table and share the view with the partner.
- D
Create a Google Cloud project for the partner, transfer the dataset to that project, and grant appropriate permissions.
Show answer and explanation
Correct answer: C
Explanation
The best approach to securely share a specific table with an external partner in BigQuery is to use authorized views. Authorized views allow you to restrict access to specific data within a table or dataset by creating a view and granting the partner access to the view instead of the underlying table. This ensures data security and meets all the requirements, including not needing the partner to have a Google Cloud account.
- A. Incorrect.
This option would grant the partner access to the entire dataset, which violates the requirement of limiting access to only the specific table.
- B. Incorrect.
BigQuery does not support signed URLs for table access. This is not a valid approach for sharing data securely.
- C. Correct.
Using authorized views allows you to limit access to specific tables or even specific columns, and you can share the view with the partner securely without requiring them to have a Google Cloud account. This meets all the requirements.
- D. Incorrect.
Transferring the dataset to a new project and managing permissions there would be complex and unnecessary. It also does not address the requirement to provide access without a Google Cloud account.