Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
Google Cloud · Professional Data Engineer

Data migrations

Professional Data Engineer · Lesson 5 of 23 · 28:09

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

Learning with these videos? Subscribe for new courses and exam-style questions.

In this lesson

Prepare for the Google Cloud Professional Data Engineer exam, on the official exam guide. In this lesson: planning a migration in waves, moving databases with Database Migration Service and Datastream, moving warehouses and files with the BigQuery Data Transfer Service, Storage Transfer Service, and Transfer Appliance, networking, and validating the result. Includes three original practice questions, with Cymbal Mobility, a fictional ride-hailing and scooter company, as the example.

Study notes

The text of this lesson, to read at your own pace. Information as of November 2026.

Leaving the data center

Cymbal Mobility still runs a data warehouse in its own data center, with ten years of trips, a MySQL database that takes bookings all day, and four hundred terabytes of archived sensor files. The data center closes next year. The migration must not lose data, must not stop bookings, and must prove that the numbers still match.

Planning a migration

A migration starts with what exists today. Talk to the stakeholders, list the users and their reports, the processes that load and use the data, the technologies, and the dependencies between them. Then describe the target state, and a plan to get there, often in waves, starting with something small and useful. For the network, Cloud VPN uses an encrypted tunnel over the internet, and Cloud Interconnect gives a private, high-bandwidth link. And do the math early: four hundred terabytes over a one gigabit link take more than a month, even at full speed.

Moving databases

Database Migration Service moves databases into Cloud SQL, or AlloyDB for PostgreSQL. It copies an initial snapshot, then keeps replicating changes, so the source stays in use until a short cutover. It also supports heterogeneous migrations, like Oracle to PostgreSQL, with tools to convert the schema and the code. Datastream is different: it captures changes from MySQL, PostgreSQL, Oracle, or SQL Server, and replicates them into BigQuery or Cloud Storage, so analytics stay current while the source database keeps running.

Moving warehouses and files

Warehouses and files have their own tools. For a data warehouse, BigQuery Migration Service assesses the old warehouse, translates its SQL from other dialects, and helps move the data. BigQuery Data Transfer Service loads data into BigQuery on a schedule, from sources like Amazon S3, Amazon Redshift, Teradata, Google Ads, or Salesforce, and it can backfill missing periods. Storage Transfer Service moves files and objects into Cloud Storage, from other clouds, from your own storage, or from Hadoop clusters. And when the network is too slow, Transfer Appliance is a storage device that Google ships to you: you copy the data onto it, ship it back, and Google uploads it to Cloud Storage.

Validating the migration

A migration is finished only when the data is proven correct. Compare the source and the target: row counts, sums and other aggregates, and checksums of rows, table by table. Google's open-source Data Validation Tool automates these comparisons. Run the old and new systems in parallel for a while, compare their reports, keep a way to roll back, and switch the old system off only after the business signs off.

Recap

Let's recap. Plan from what exists today, migrate in waves, and choose Cloud VPN or Cloud Interconnect after doing the math on bandwidth. Database Migration Service moves databases into Cloud SQL or AlloyDB with continuous replication and a short cutover, while Datastream replicates changes into BigQuery or Cloud Storage. BigQuery Migration Service translates and moves warehouses, and BigQuery Data Transfer Service loads data on a schedule. Storage Transfer Service moves files over the network, and Transfer Appliance ships them. And validate with counts, aggregates, and checksums before switching anything off.

Quick checks for this lesson

The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.

  1. The MySQL bookings database must move to Cloud SQL, and bookings may stop for a few minutes at most, during the final switch. What should the data engineer use?

    • A full export, then an import into Cloud SQL
    • Database Migration Service, continuous migration
    • Datastream into BigQuery
    • Storage Transfer Service
    Show the answer

    Database Migration Service, continuous migration

    Database Migration Service copies a snapshot, then replicates changes continuously, so the cutover takes only minutes. “A full export, then an import into Cloud SQL” would stop bookings for the whole export and import. “Datastream into BigQuery” only replicates changes into BigQuery or Cloud Storage, not into a Cloud SQL database for the application. And “Storage Transfer Service” is for files and objects, not for a live database.

  2. 400 terabytes of sensor archives must be in Cloud Storage within three weeks, and the data center only has a shared one gigabit link. What fits best?

    • Storage Transfer Service over the existing link
    • BigQuery Data Transfer Service
    • Transfer Appliance
    • Datastream
    Show the answer

    Transfer Appliance

    Transfer Appliance avoids the slow link, because the data travels on a device that Google uploads. “Storage Transfer Service over the existing link” would need more than a month at full speed, on a link that other systems also use. “BigQuery Data Transfer Service” only loads data into BigQuery, and it would still use the same slow link. And “Datastream” only replicates database changes, not archived files.

  3. The warehouse tables are now in BigQuery. Before the old warehouse is switched off, finance wants proof that every table holds the same data. What should the data engineer do?

    • List the BigQuery tables and their schemas
    • Switch off the old warehouse, then test BigQuery
    • Open a few rows of each table by eye
    • Compare counts, aggregates, and row checksums
    Show the answer

    Compare counts, aggregates, and row checksums

    Compare row counts, aggregates, and row checksums between both systems, for example with the Data Validation Tool. “List the BigQuery tables and their schemas” only checks that the tables exist, not what they hold. “Switch off the old warehouse, then test BigQuery” would destroy the only way to compare, or to roll back. And “Open a few rows of each table by eye” only checks a few rows by eye, which proves very little.