Google Cloud Professional Cloud Database Engineer — Question 85
You use Python scripts to generate weekly SQL reports to assess the state of your databases and determine whether you need to reorganize tables or run statistics. You want to automate this report but need to minimize operational costs and overhead. What should you do?
Answer options
- A. Create a VM in Compute Engine, and run a cron job.
- B. Create a Cloud Composer instance, and create a directed acyclic graph (DAG).
- C. Create a Cloud Function, and call the Cloud Function using Cloud Scheduler.
- D. Create a Cloud Function, and call the Cloud Function from a Cloud Tasks queue.
Correct answer: C
Explanation
The correct answer is C, as using a Cloud Function triggered by Cloud Scheduler allows for efficient automation without the overhead of managing a VM or a complex DAG. Options A and B involve more operational costs and management, while option D introduces unnecessary complexity with Cloud Tasks, which is not needed for this straightforward automation task.