Google Associate Cloud Engineer Question 148
Select 2Google Cloud PlatformYou are tasked with loading a large CSV dataset into Google BigQuery for analysis. The data is stored in a Google Cloud Storage bucket. Which of the following steps should you take to efficiently load the data into BigQuery?
- A
Use the BigQuery Data Transfer Service to load the CSV file from Google Cloud Storage.
- B
Use the BigQuery web UI to manually upload the CSV file from your local machine.
- C
Utilize the bq command-line tool to load the data directly from the Google Cloud Storage bucket.
- D
Create a Google Cloud Function to trigger a data load into BigQuery every time a new file is uploaded to the Cloud Storage bucket.
- E
Configure a BigQuery Dataflow job to read from the Cloud Storage bucket and write to BigQuery.
Show answer and explanation
Correct answers: C, D
Explanation
To efficiently load large datasets from Google Cloud Storage into BigQuery, using the bq command-line tool provides a direct and effective method. Additionally, automating the process with a Google Cloud Function allows for seamless integration and loading of new files, keeping the dataset updated without manual intervention.
- A. Incorrect.
The BigQuery Data Transfer Service is used for scheduling and managing recurring data loads from SaaS applications and does not support loading CSV files from Cloud Storage.
- B. Incorrect.
The BigQuery web UI is not efficient for loading large datasets from local storage, especially when the data is already in Cloud Storage.
- C. Correct.
The bq command-line tool is a recommended way to load data directly from Google Cloud Storage into BigQuery, especially for large datasets.
- D. Correct.
Creating a Google Cloud Function to trigger a data load on new file uploads is an efficient way to automate the loading process from Cloud Storage to BigQuery.
- E. Incorrect.
While Dataflow can be used to stream data into BigQuery, it is more complex and not necessary if the goal is to simply load a static CSV file.