Courseiva

Google ACE Practice Question: Ensuring Successful Operation of a Cloud Solution

A developer needs to query BigQuery using the bq command-line tool with standard SQL. Which flag should they include?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

--use_legacy_sql=false

The '--use_legacy_sql=false' flag enables standard SQL. By default, bq uses legacy SQL. '--format' controls output format, not SQL dialect. '--project_id' specifies project. '--sync' is not a valid bq flag.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • --format

    Why it's wrong here

    The `--format` flag controls how BigQuery presents query results (e.g., `prettyjson`, `json`, `csv`) and has no effect on query parsing. Even if you specify a valid output format, the `bq query` command still defaults to legacy SQL, so a standard SQL query will fail with a syntax error before any formatting is applied. Thus, setting `--format` alone does nothing to make the query execute successfully.

  • --use_legacy_sql=false

    Why this is correct

    `--use_legacy_sql=false` is the required flag because the `bq` command-line tool historically defaults to legacy SQL when running queries. Legacy SQL uses a different syntax and operates differently from standard GoogleSQL (e.g., unique handling of JOINs and functions). Passing `false` explicitly switches the parser to standard SQL, allowing the developer's query to run without rewriting it into legacy dialect.

  • --project_id

    Why it's wrong here

    The `--project_id` flag sets the default Google Cloud project for the operation, which determines where resources and jobs are resolved and billed. While it is necessary for targeting the correct project, it in no way influences the SQL dialect the parser uses. A query written in standard SQL will still be rejected as invalid unless you also add `--use_legacy_sql=false`, so `--project_id` cannot substitute for the correct flag.

  • --sync

    Why it's wrong here

    The `--sync` flag (default `true`) controls whether the `bq` command blocks until the query job completes or returns immediately with a job reference that you can poll later. This affects job execution timing and scripting behavior, not how query text is interpreted. Regardless of the `--sync` value, without `--use_legacy_sql=false` the query is still parsed as legacy SQL, so standard SQL syntax remains invalid.

About these practice questions

One of 769 original ACE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.