exam questions

Exam Professional Cloud Database Engineer All Questions

View all questions & answers for the Professional Cloud Database Engineer exam

Exam Professional Cloud Database Engineer topic 1 question 45 discussion

Actual exam question from Google's Professional Cloud Database Engineer
Question #: 45
Topic #: 1
[All Professional Cloud Database Engineer Questions]

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?

  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
chelbsik
Highly Voted 1 year, 10 months ago
Selected Answer: B
https://cloud.google.com/blog/topics/developers-practitioners/scheduling-cloud-sql-exports-using-cloud-functions-and-cloud-scheduler
upvoted 8 times
...
Pime13
Most Recent 5 months, 4 weeks ago
Selected Answer: B
https://cloud.google.com/sql/docs/mysql/backup-recovery/scheduling-backups#creating_a_pub_sub_topic_a_cloud_function_and_a_cloud_scheduler_job
upvoted 2 times
...
nhiguchi
11 months, 3 weeks ago
Selected Answer: C
C is correct.
upvoted 2 times
...
learnazureportal
1 year, 1 month ago
The most accurate answer based on Google-recommended practices would be C
upvoted 1 times
...
KennyHuang
1 year, 4 months ago
Selected Answer: C
C is the recommended choice as it leverages Cloud Composer's workflow orchestration capabilities to schedule and automate the export process. By calling the cloudsql.instances.export API within the workflow, you can ensure that the data is exported from Cloud SQL for MySQL in CSV format as needed by your data analysis team.
upvoted 2 times
...
KennyHuang
1 year, 4 months ago
Selected Answer: C
Cloud Composer is a fully managed workflow orchestration service. It allows you to define and manage complex workflows using Apache Airflow. By using Cloud Composer, you can create a workflow that includes a task to export data from Cloud SQL for MySQL using the cloudsql.instances.export API. You can specify the export format as CSV to meet the requirement of your data analysis team. This approach provides a scalable and manageable solution for regular data exports. Therefore, option C is the recommended choice as it leverages Cloud Composer's workflow orchestration capabilities to schedule and automate the export process. By calling the cloudsql.instances.export API within the workflow, you can ensure that the data is exported from Cloud SQL for MySQL in CSV format as needed by your data analysis team.
upvoted 1 times
...
dynamic_dba
1 year, 7 months ago
B. Performing a “SELECT * FROM TABLE” wouldn’t give you CSV output and that alone wouldn’t call an API. Eliminate A. There’s no need for Cloud Composer in this scenario, especially when the solution is a known combination of Cloud Scheduler, Cloud Function and a Pub/Sub Topic, which is B.
upvoted 4 times
njda
1 year, 1 month ago
why will someone use 3 services when it can be done using 1 service only, in this case composer. Secondly export can be for multiple tables, and ,cloud functions has a execution time limit.? C still looks most appropriate solution.
upvoted 3 times
...
...
Nirca
1 year, 7 months ago
Selected Answer: B
https://cloud.google.com/blog/topics/developers-practitioners/scheduling-cloud-sql-exports-using-cloud-functions-and-cloud-scheduler
upvoted 2 times
...
[Removed]
1 year, 9 months ago
what if the query is large, Cloud Function has limit? shouldn't it be C?
upvoted 2 times
...
sp57
1 year, 10 months ago
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." https://rominirani.com/google-cloud-functions-tutorial-using-the-cloud-scheduler-to-trigger-your-functions-756160a95c43
upvoted 3 times
...
GCP72
1 year, 10 months ago
Selected Answer: A
A is the correct answer, PUSUB is not required for this task
upvoted 3 times
cardareel
1 year, 1 month ago
Doing a SELECT * won't call the API. Pub/Sub is not needed, you are correct, the problem is the SELECT * (nothing to do there).
upvoted 1 times
...
...
pk349
1 year, 10 months ago
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.
upvoted 2 times
cardareel
1 year, 1 month ago
Doing a SELECT * won't call the API. Pub/Sub is not needed, you are correct, the problem is the SELECT * (nothing to do there).
upvoted 1 times
...
gabrielosluz
1 year, 8 months ago
The answer is letter B. Google recomends this pattern to perform this task: https://cloud.google.com/sql/docs/mysql/backup-recovery/scheduling-backups
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago