
Ultimate access to all questions.
How can you export daily data extracts from Cloud SQL for MySQL in CSV format to train a machine learning model for next-day route optimization, following Google-recommended practices?
A
Use Cloud Scheduler to trigger a Cloud Function that will run a select * from table(s) query to call the cloudsql.instances.export API.*
B
Use Cloud Scheduler to trigger a Cloud Function through Pub/Sub to call the cloudsql.instances.export API.
C
Use Cloud Composer to orchestrate an export by calling the cloudsql.instances.export API.
D
Use Cloud Composer to execute a select * from table(s) query and export results.*
Explanation:
To export data from Cloud SQL for MySQL in CSV format for daily extracts, the Google-recommended practice involves using the cloudsql.instances.export API. This API is designed for exporting data from Cloud SQL instances. The best approach is to automate this process using Cloud Scheduler to trigger a Cloud Function that calls the cloudsql.instances.export API. This method is efficient and follows Google's best practices for automation and data export. Option A suggests using Cloud Scheduler to trigger a Cloud Function that runs a select query, which is not the recommended way to export data directly. Option C and D involve using Cloud Composer, which is more suited for workflow orchestration rather than direct data export tasks. Therefore, the correct answer is B, as it directly uses the cloudsql.instances.export API in an automated and recommended manner.