Medium1 markMultiple Choice

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

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

Which command should you use?

Answer options:

A.

bq load analytics.sales gs://my-bucket/sales_data.csv

B.

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

C.

gcloud bigquery import gs://my-bucket/sales_data.csv analytics.sales

D.

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

How to approach this question

Identify the correct CLI tool for BigQuery (bq) and the correct verb for ingesting data (load).

Full Answer

A.bq load analytics.sales gs://my-bucket/sales_data.csv✓ Correct
To interact with BigQuery from the command line, you use the `bq` tool. The specific command to ingest data from a file (local or in Cloud Storage) into a BigQuery table is `bq load`. The syntax is `bq load [DATASET].[TABLE] [SOURCE_FILE]`.

Common mistakes

Trying to use `gsutil cp` to copy into BigQuery, or guessing the verb is 'import' instead of 'load'.

Practice the full GCP Associate Cloud Engineer Practice Exam 5

50 questions · hints · full answers · grading

More questions from this exam