Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Database Engineer practice bank has an additional 769 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
A financial services company is migrating an existing relational database from a non-Spanner system to a new GoogleSQL-dialect Spanner database. The team wants to use Google Cloud's managed bulk import pipeline without writing custom Apache Beam transformation code while meeting these requirements:
NUMERIC financial columns and microsecond-level TIMESTAMP values.Which export format, column mapping, and import procedure should the database engineer use?
SQL dump files contain engine-specific DDL and INSERT statements generated by utilities such as mysqldump or pg_dump. Cloud SQL uses managed import operations (gcloud sql import sql) to read these files from Cloud Storage and replay them against a Cloud SQL for MySQL, PostgreSQL, or SQL Server instance.
INSERT statements cannot leverage Dataflow's parallel distributed workers and struggles to maintain performance on large datasets.gcloud spanner databases ddl update or Spanner Studio rather than executing arbitrary dump scripts.You were migrating or restoring a relational database into Cloud SQL (such as PostgreSQL or MySQL) rather than Spanner, where properly formatted SQL dump files in a standard Cloud Storage bucket are a supported import method.
Although Avro is the correct file format for Spanner bulk imports, this option misapplies both the Avro data type mapping and the restore mechanism. Spanner Backup and Restore is a managed feature designed exclusively to create and mount native, point-in-time consistent Spanner backups retained for up to one year.
NUMERIC financial columns to Avro DOUBLE converts exact base-10 decimals into 64-bit binary floating-point numbers (FLOAT64 in GoogleSQL). This introduces rounding inaccuracies that are unacceptable for financial data.spanner-export.json manifest.BYTES only maps to NUMERIC when logicalType=decimal, precision=38, and scale=9 are explicitly specified; otherwise it is treated as raw BYTES.You were recovering an existing Spanner database from a previously taken native Spanner backup for disaster recovery, rather than importing external non-Spanner data with exact NUMERIC precision.
CSV is a simple, delimited plain-text format that stores row values without embedded schema metadata. While analytical engines such as BigQuery can auto-detect CSV schemas and create destination tables on the fly during batch loads, Spanner's managed bulk import pipeline does not operate this way.
spanner-export.json manifest. Importing raw CSV files into Spanner requires writing custom Apache Beam transformation code in Java or Python.NUMERIC precision or complex types like ARRAY, increasing the risk of parsing errors or truncation.The target destination were BigQuery rather than Spanner, or if the engineering team intended to author a custom Apache Beam pipeline in Dataflow to parse CSV records, transform data types, and enforce parent-before-child write ordering manually.
Importing data from a non-Spanner database into Spanner without custom pipeline code relies on Google Cloud's managed Dataflow import architecture. This workflow reads self-describing Apache Avro data files from a Cloud Storage bucket using a spanner-export.json manifest file that maps each Avro file set to its destination Spanner table.
NUMERIC columns to Avro BYTES with logicalType=decimal, precision=38, and scale=9 guarantees exact decimal representation without floating-point rounding errors. Microsecond TIMESTAMP values are preserved using Avro LONG (microseconds since 1970-01-01 00:00:00 UTC) or canonical STRING formatting.gcloud CLI.precision=38, scale=9) and PostgreSQL (precision=147455, scale=16383) Spanner dialects when configured with the matching Avro decimal metadata.Unlike CSV-based transfers that require custom Apache Beam parsing code or Cloud SQL utilities designed for single-node relational engines, the Avro + spanner-export.json + Dataflow procedure is purpose-built for high-throughput, schema-safe bulk loading into distributed Spanner databases.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated