
Google Professional Cloud Database Engineer
Get started today
Ultimate access to all questions.
How can you automate the generation of weekly SQL reports using Python scripts to evaluate database health and determine reorganization or statistics needs while minimizing operational costs and overhead?
How can you automate the generation of weekly SQL reports using Python scripts to evaluate database health and determine reorganization or statistics needs while minimizing operational costs and overhead?
Explanation:
To automate the generation of weekly SQL reports with minimal operational costs and overhead, the best approach is to use serverless technologies. Option C, creating a Cloud Function and calling it using Cloud Scheduler, is the most cost-effective and efficient solution. Cloud Functions are serverless, meaning you only pay for the compute time you consume, and there's no need to manage any infrastructure. Cloud Scheduler is a fully managed cron job service that can trigger the Cloud Function at specified intervals, making it perfect for weekly reports. Option A involves creating a VM, which requires ongoing management and incurs costs even when not in use. Option B, using Cloud Composer, is overkill for this simple task and involves higher costs and complexity. Option D, while also serverless, introduces unnecessary complexity by using Cloud Tasks for a simple scheduled task.