Google Cloud Professional Cloud Database Engineer — Question 72
You work in the logistics department. Your data analysis team needs daily extracts from Cloud SQL for MySQL to train a machine learning model. The model will be used to optimize next-day routes. You need to export the data in CSV format. You want to follow Google-recommended practices. What should you do?
Answer options
- 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.
Correct answer: B
Explanation
The correct answer is B because it ensures that the export process is initiated reliably using Cloud Scheduler and leverages Pub/Sub for asynchronous processing, which is recommended by Google. Option A is incorrect as it does not utilize Pub/Sub, which adds robustness. Option C, while it uses Cloud Composer, does not follow the recommended triggering method. Option D fails to use the cloudsql.instances.export API, which is necessary for the export process.