
Google Professional Cloud Database Engineer
Get started today
Ultimate access to all questions.
How can you create a copy of your Cloud Spanner database in a new test environment to handle the increased number of test cases from the QA team while adhering to Google's best practices?
How can you create a copy of your Cloud Spanner database in a new test environment to handle the increased number of test cases from the QA team while adhering to Google's best practices?
Explanation:
To create a copy of your Cloud Spanner database for a new test environment following Google-recommended practices, the best approach is to use Dataflow to run the export in Avro format. Dataflow is a fully managed service for transforming and enriching data in stream and batch modes, and it's recommended for large-scale data operations like exporting a Cloud Spanner database. Avro format is a binary format that is compact and efficient for storage and processing, making it suitable for exporting databases. Cloud Functions are more suited for event-driven, small-scale operations rather than large database exports. Text format is less efficient than Avro for large datasets and is not the recommended format for such operations.