Google Professional Machine Learning Engineer Question 237
Single answerGoogle Cloud PlatformYou are building a machine learning pipeline to process a large dataset stored in Google Cloud Storage. The dataset will be used to train a model predicting customer churn. To improve preprocessing performance, you want to query specific subsets of the dataset and join them with additional structured data stored in BigQuery. Which of the following approaches would be most efficient for this scenario?
- A
Export the data from Google Cloud Storage to a local server, preprocess it there, and upload it back to Cloud Storage.
- B
Use BigQuery to query the structured data, export the results to Cloud Storage, and combine them with the dataset using a custom script.
- C
Use BigQuery federated queries to query the data directly from Cloud Storage and join it with the structured data in BigQuery.
- D
Load the dataset from Cloud Storage into a Cloud SQL database, then query and preprocess the data before training the model.
Show answer and explanation
Correct answer: C
Explanation
BigQuery federated queries enable you to process data directly in Cloud Storage without needing to move it, while also allowing seamless integration with structured data stored in BigQuery. This approach is cost-efficient, reduces latency, and takes full advantage of Google Cloud's serverless data processing capabilities.
- A. Incorrect.
Exporting data to a local server introduces unnecessary overhead and latency, making it inefficient in a cloud-native environment.
- B. Incorrect.
Exporting structured data from BigQuery to Cloud Storage and combining it using a custom script is inefficient compared to leveraging built-in features like federated queries.
- C. Correct.
BigQuery's federated queries allow you to query data directly from Cloud Storage and join it with structured data in BigQuery efficiently, avoiding data movement and reducing processing time.
- D. Incorrect.
Loading the dataset into Cloud SQL adds unnecessary complexity and costs, as BigQuery is better suited for querying large datasets and performing joins in this scenario.