CLOUD-DATABASE-ENGINEER practice question 7 of 25
You finished migrating an on-premises MySQL database to Cloud SQL. You want to ensure that the daily export of a table, which was previously a cron job running on the database server, continues. You want the solution to minimize cost and operations overhead. What should you do?
Full set: 141 questionsThis solution is the most cost-effective and operationally efficient. Cloud Scheduler is a fully managed cron service designed for triggering jobs on a schedule, directly replacing the on-premises cron functionality. Cloud Functions provides a serverless compute environment, meaning you only pay for the brief execution time of the export script. This serverless combination eliminates the need to manage and pay for a constantly running virtual machine, minimizing both cost and operational overhead, which directly aligns with the requirements.
B. A streaming Dataflow job is designed for continuous, real-time data processing, not for a scheduled daily batch export. This is the wrong tool and would be unnecessarily complex and costly.
C. Cloud Composer is a powerful workflow orchestration tool for complex, multi-step data pipelines (DAGs). Using it for a single, simple daily task is excessive and violates the principle of minimizing cost and overhead.
D. Using a Compute Engine instance replicates the on-premises model, requiring a virtual machine to run 24/7. This incurs unnecessary costs and operational overhead for patching, security, and management.
1. Cloud Scheduler and Cloud Functions Pattern: The official Google Cloud documentation provides a tutorial for this exact use case. It states, "This page shows how to use Cloud Scheduler to trigger a Cloud Function on a schedule." This pattern is recommended for running background jobs reliably.
Source: Google Cloud Documentation, "Schedule a Cloud Function to run with Cloud Scheduler".
2. Cloud Functions for Cost-Effectiveness: The Cloud Functions documentation highlights its serverless nature. "With Cloud Functions, you write simple, single-purpose functions... and you're only billed for the time your code runs, metered to the nearest 100 milliseconds." This directly supports the "minimize cost" requirement.
Source: Google Cloud Documentation, "What is Cloud Functions?".
3. Cloud SQL Export API: The Cloud Function would call the Cloud SQL Admin API to perform the export. This is a standard, supported method for programmatically managing database operations.
Source: Google Cloud Documentation, "Cloud SQL Admin API v1beta4, instances: export".
4. Cloud Composer Use Case: The Cloud Composer documentation clarifies its purpose: "Cloud Composer is a fully managed workflow orchestration service... for creating, scheduling, monitoring, and managing workflows that span across clouds and on-premises data centers." This indicates it is for more complex scenarios than a single export task.
Source: Google Cloud Documentation, "Cloud Composer overview".
Keep practicing
Take the free CLOUD-DATABASE-ENGINEER practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CLOUD-DATABASE-ENGINEER practice questions
- Question 1Your DevOps team is using Terraform to deploy applications and Cloud SQL databases. After…
- Question 2Your company is developing a new global transactional application that must be ACID-compl…
- Question 3You are designing a database strategy for a new web application. You plan to start with a…
- Question 4Your application uses Cloud SQL for MySQL. Your users run reports on data that relies on …
- Question 5You plan to use Database Migration Service to migrate data from a PostgreSQL on-premises …
- Question 6You host an application in Google Cloud. The application is located in a single region an…
