
Answer-first summary for fast verification
Answer: gcloud dataflow sql query
The correct command to execute a SQL query and write the results to a BigQuery table using Cloud Dataflow is `gcloud dataflow sql query`. This command utilizes the Google Cloud CLI to interact with the Dataflow service, specifically for executing SQL queries. Dataflow SQL enables you to process and analyze data with SQL, leveraging Cloud Dataflow's scalable and distributed processing capabilities. It integrates seamlessly with BigQuery, allowing for efficient data transformation and analysis. For example: ```bash gcloud dataflow sql query \ --query "SELECT * FROM `my-project.my_dataset.my_table`" \ --output "bigquery:my-project.my_dataset.output_table" ``` This example selects all columns from a specified BigQuery table and writes the results to a new table. Remember to replace placeholder names with your actual project, dataset, and table names.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
As a data analyst for a major metropolitan public transportation agency, you're responsible for monitoring passenger data across all transport modes. You plan to use SQL within Cloud Dataflow to query this data and save the results to a BigQuery table. Which command should you use? (Assume all necessary parameters will be provided.)
A
bq bigquery sql query
B
gcloud bigquery sql query
C
gcloud dataflow sql query
D
bq dataflow sql query
No comments yet.