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?
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
Q01You are starting a new initiative and need to create a new Google Cloud project using the command...EasyQ02A developer on your team needs to manage App Engine applications, including deploying new version...MediumQ03You have created a new Google Cloud project. You need to allow a specific group of developers to ...MediumQ04Which statement best describes the relationship between Google Cloud projects and billing accounts?EasyQ05Your company wants to be notified immediately in their Slack channel whenever their monthly Googl...Medium
Expert