PROFESSIONAL-CLOUD-DATABASE-ENGINEER · Question #20
You are running an instance of Cloud Spanner as the backend of your ecommerce website. You learn that the quality assurance (QA) team has doubled the number of their test cases. You need to create a…
The correct answer is C. Use Dataflow to run the export in Avro format. Google's official recommended tool for exporting and importing Cloud Spanner databases is Dataflow, using the Avro format. Avro is a binary format that preserves Cloud Spanner's native data types (including types like ARRAY, STRUCT, and TIMESTAMP) accurately, ensuring data…
Question
You are running an instance of Cloud Spanner as the backend of your ecommerce website. You learn that the quality assurance (QA) team has doubled the number of their test cases. You need to create a copy of your Cloud Spanner database in a new test environment to accommodate the additional test cases. You want to follow Google-recommended practices. What should you do?
Options
- AUse Cloud Functions to run the export in Avro format.
- BUse Cloud Functions to run the export in text format.
- CUse Dataflow to run the export in Avro format.
- DUse Dataflow to run the export in text format.
How the community answered
(42 responses)- A14% (6)
- B7% (3)
- C76% (32)
- D2% (1)
Explanation
Google's official recommended tool for exporting and importing Cloud Spanner databases is Dataflow, using the Avro format. Avro is a binary format that preserves Cloud Spanner's native data types (including types like ARRAY, STRUCT, and TIMESTAMP) accurately, ensuring data fidelity when the database is imported into the test environment. Cloud Functions (Options A and B) are event-driven, short-lived, and not designed for large-scale data processing jobs like exporting a full Cloud Spanner database - they lack the scalability and execution time needed. Text format (Option D) does not preserve schema type information as reliably as Avro and is not the Google-recommended format for Spanner exports.
Topics
Community Discussion
No community discussion yet for this question.