Google Associate Cloud Engineer Question 242
Single answerGoogle Cloud PlatformAs a Google Certified Associate Cloud Engineer, you are tasked with retrieving data from a Cloud SQL instance for a business analytics report. Which of the following steps should you take to execute a query on the Cloud SQL instance using the Cloud Console?
- A
Navigate to the SQL section in the Google Cloud Console, select the instance, and use the Query Editor to run SQL queries.
- B
Download the SQL client library, connect to the instance using a local terminal, and run the queries locally.
- C
Access the Cloud SQL instance through the Cloud Shell and execute the query using the gcloud sql query command.
- D
Enable the BigQuery API and use BigQuery to run SQL queries directly on the Cloud SQL instance.
Show answer and explanation
Correct answer: A
Explanation
To execute queries on a Cloud SQL instance via the Google Cloud Console, you can use the Query Editor, which provides a direct interface for running SQL queries. This method leverages the console's built-in tools, offering a straightforward approach for querying data within Cloud SQL.
- A. Correct.
You can use the Query Editor in the Cloud Console to directly execute SQL queries on a Cloud SQL instance.
- B. Incorrect.
While downloading the SQL client library and using a local terminal is possible, it is not a direct method available from the Cloud Console.
- C. Incorrect.
The gcloud sql query command does not exist; thus, this is not a viable method to execute queries.
- D. Incorrect.
BigQuery is a different service and does not natively run queries on Cloud SQL instances without data transfer or integration.