PROFESSIONAL-DATA-ENGINEER practice question 6 of 10

You use a dataset in BigQuery for analysis. You want to provide third-party companies with access to the same dataset. You need to keep the costs of data sharing low and ensure that the data is current. Which solution should you choose?

Full set: 401 questions
Answer options
A: Create an authorized view on the BigQuery table to control data access, and provide third-party companies with access to that view. Correct answer
B: Use Cloud Scheduler to export the data on a regular basis to Cloud Storage, and provide third- party companies with access to the bucket.
C: Create a separate dataset in BigQuery that contains the relevant data to share, and provide third- party companies with access to the new dataset.
D: Create a Cloud Dataflow job that reads the data in frequent time intervals, and writes it to the relevant BigQuery dataset or Cloud Storage bucket for third-party companies to use.
Correct Answer:
A. Create an authorized view on the BigQuery table to control data access, and provide third-party companies with access to that view.
Explanation

Creating an authorized view is the most effective solution as it directly meets all the requirements. An authorized view allows you to grant third parties access to the results of a query without giving them access to the underlying source table. This ensures data is always current because the view queries the live data. For cost-effectiveness, the data owner only pays for the storage of the original dataset. The third-party company is billed for the queries they run against the view in their own Google Cloud project, thus keeping costs low for the data owner.

Why Incorrect

B: Exporting data to Cloud Storage creates a separate, static copy. This fails the requirement for the data to be current and incurs additional storage costs in Cloud Storage for the data owner. C: Creating a separate dataset duplicates the data, which doubles the storage costs in BigQuery for the data owner. It also requires a separate process to keep the data synchronized, failing the "current data" requirement. D: Using a Cloud Dataflow job is overly complex and expensive for this use case. It incurs compute costs for the Dataflow job in addition to duplicating data, and the data would still only be as current as the last job run.

References

1. Google Cloud Documentation - Introduction to authorized views: "An authorized view allows you to share query results with particular users and groups without giving them access to the underlying tables... Because the view is a query, the data shared with the view's users is always current with the view's source tables." This directly supports the "current data" and access control aspects of the correct answer.

2. Google Cloud Documentation - BigQuery pricing, Query pricing models: "When you query data in BigQuery... you are charged for the number of bytes read... Query costs are billed to the Google Cloud project of the user who queries the view." This confirms that the third party, not the data owner, pays for the queries, satisfying the "low cost" requirement for the owner.

3. Google Cloud Documentation - Create authorized views: "By using an authorized view, you can share your data with third parties without exposing your raw data and by controlling the costs incurred for querying the data." This statement explicitly recommends authorized views for the exact scenario described in the question.

4. Google Cloud Documentation - BigQuery export pricing: "There is no charge for exporting data from BigQuery, but you do incur charges for storing the exported data in Cloud Storage." This shows that option B, while having a free export job, still incurs additional storage costs, making it more expensive than an authorized view which does not duplicate storage.

Scroll to Top