GCP Professional Cloud Architect Practice Question
You manage a BigQuery ingestion-time partitioned table called logs.raw in project analytics-prod (location US). A Cloud Scheduler job must run each morning and, using the bq CLI, export only the partition for the previous UTC day to Cloud Storage as compressed Newline-delimited JSON. The export must overwrite any existing objects and automatically split the output into multiple shards if it exceeds the per-file size limit. Which command pattern meets all of these requirements?
The bq extract command is the correct tool for exporting table data to Cloud Storage.
Key requirements and how the command satisfies them:
Export a single ingestion-time partition from an ingestion-time partitioned table - use the partition decorator $YYYYMMDD (e.g. $20230915).
Output format must be Newline-delimited JSON - --destination_format=NEWLINE_DELIMITED_JSON.
Use compression - --compression=GZIP.
Allow BigQuery to shard the output when a wildcard (*) is present in the destination URI - gs://acme-exports/logs/raw-*.json.gz.
Overwrite existing objects - the extract job overwrites any objects whose names exactly match the destination URI pattern; therefore rerunning the command with the same wildcard names replaces the files for that partition.
The correct option incorporates all these flags, uses the $ partition decorator, specifies compression and destination format, and includes a wildcard in the Cloud Storage URI. The incorrect answers each violate at least one requirement:
An answer without the $YYYYMMDD decorator would export the entire table.
Using --format=JSON or omitting the format flag causes a syntax error or exports to CSV by default.
A command that omits the wildcard cannot create multiple shards and risks exceeding the 1 GB limit.
A command lacking --compression=GZIP produces uncompressed files.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the `$YYYYMMDD` partition decorator in BigQuery?
Open an interactive chat with Bash
Why is `--destination_format=NEWLINE_DELIMITED_JSON` preferred for exporting BigQuery data?
Open an interactive chat with Bash
How does BigQuery handle sharding when using a wildcard (`*`) in the Cloud Storage URI?
Open an interactive chat with Bash
What is ingestion-time partitioning in BigQuery?
Open an interactive chat with Bash
Why is Newline-delimited JSON used in BigQuery exports?
Open an interactive chat with Bash
How does the wildcard in the destination URI enable file sharding?
Open an interactive chat with Bash
GCP Professional Cloud Architect
Managing implementation
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .