Topic 1 Question 45
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?
Use Cloud Scheduler to trigger a Cloud Function that will run a select * from table(s) query to call the cloudsql.instances.export API.
Use Cloud Scheduler to trigger a Cloud Function through Pub/Sub to call the cloudsql.instances.export API.
Use Cloud Composer to orchestrate an export by calling the cloudsql.instances.export API.
Use Cloud Composer to execute a select * from table(s) query and export results.
ユーザの投票
コメント(9)
- 正解だと思う選択肢: B👍 6chelbsik2022/12/24
- 正解だと思う選択肢: A
A is the correct answer, PUSUB is not required for this task
👍 3GCP722022/12/27 As noted in text from this link, Cloud Function can be triggered with/without pub/sub. I think distinction between A & B is suggestion in A the API s called from query, which is not correct - the 'select query' is passed as parameter in call, so I think B is correct.
"Note that we could also have a Pub/Sub Trigger configured Cloud Function get triggered by the Scheduler by using the same steps given above to create a job. Except that in the target, you will select Pub/Sub and provide the Pub/Sub Topic name. At the scheduler trigger time, the Cloud Scheduler will publish a message to the topic with the message body that you specify."
👍 3sp572022/12/30
シャッフルモード