Medium1 markMultiple Choice

GCP ACE · Question 27 · Domain 3.4: Deploying and implementing data solutions

You have a 50 GB CSV file stored in a Cloud Storage bucket (gs://my-data-bucket/sales.csv). You need to load this data into a BigQuery table named sales_data in the finance dataset.

Which command should you use?

Answer options:

A.

gsutil cp gs://my-data-bucket/sales.csv bq://finance/sales_data

B.

gcloud bigquery load gs://my-data-bucket/sales.csv finance.sales_data

C.

bq load --source_format=CSV finance.sales_data gs://my-data-bucket/sales.csv

D.

bq import gs://my-data-bucket/sales.csv finance.sales_data

How to approach this question

Identify the correct CLI tool for BigQuery and the specific command for loading data.

Full Answer

C.bq load --source_format=CSV finance.sales_data gs://my-data-bucket/sales.csv✓ Correct
bq load --source_format=CSV finance.sales_data gs://my-data-bucket/sales.csv
The `bq` command-line tool is used to interact with BigQuery. The `bq load` command is specifically used to load data into BigQuery tables from various sources, including Cloud Storage. You specify the format, the destination table (`dataset.table`), and the source URI.

Common mistakes

Trying to use `gsutil cp` or `gcloud bigquery`. Remember that BigQuery uses the `bq` tool.

Practice the full GCP Associate Cloud Engineer Practice Exam 7

50 questions · hints · full answers · grading

More questions from this exam