Light | Speed | Road

Faster Cloud Spanner Migrations With HarbourBridge’s Schema Assistant

Today we’re announcing the HarbourBridge Schema Assistant, which provides a guided schema-design workflow for migrating from MySQL or PostgreSQL to Spanner. HarbourBridge imports dump files (from mysqldump or pg_dump) or directly connects to your source database, and converts the source database schema to an equivalent Spanner schema. The new Schema Assistant capability displays the source schema and Spanner schema side-by-side, highlights errors and walks you through a series of steps to validate and optimize your Spanner schema. It also produces a browsable assessment report with an overall migration-fitness score for Spanner, a table-by-table detailed analysis of type mappings and a list of features used in the source database that aren’t supported by Spanner. It supports editing of table and column names, column types, primary keys and constraints, as well as dropping of tables, columns, foreign keys and secondary indexes.

The new Schema Assistant complements HarbourBridge’s existing data and schema migration capabilities and is a critical step towards our goal of building a complete open-source migration toolkit. HarbourBridge continues to support command-line schema and data migration and turn-key Spanner evaluation.

Complementing the bulk data migration capabilities of HarbourBridge, we are also announcing the ability to migrate change events from MySQL to Cloud Spanner.

HarborBridge takes your MySQL or PostgreSQL schema and translates it to a Spanner schema. It will provide you with a detailed report of all the changes and spanner fit scoes.

Supported Features in Schema Assistant

  1. Global type mapping. Users can customize the global mapping for how types should be mapped to Spanner consistently across the schema. For example, mapping large integers in source schema to Spanner’s NUMERIC.
  2. Local type mapping. Users can override the custom type mapping for a given table/column.
  3. Session management. A session keeps track of all the changes made to the schema mapping.
  4. Customization of secondary indexes. Users can add, edit and delete secondary indexes to optimize their Spanner performance.
  5. Customization of foreign keys and interleaved tables. Table interleaving is an important design consideration when migrating to Cloud Spanner as explained in more detail in this blog post.

Global type mapping from MySQL to Spanner

tables and columns mapping from source to destination

Features in the pipeline

We are already working to further expand the supported set of schema editing features and welcome your feedback. We are particularly excited to expand the Schema Assistant’s design recommendations for optimizing Spanner schemas e.g. in-depth recommendations for primary key design.

HarbourBridge is open source and we gladly accept contributions from the wider community.

By: Asheesh Agrawal (Software Engineer, Cloud Spanner)
Source: Google Cloud Blog

For enquiries, product placements, sponsorships, and collaborations, connect with us at We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

Previous Article
Google Cloud | Database

Using Datastream To Unify Data For Machine Learning And Analytics

Next Article
Google Cloud | Introducing Network Connectivity

Network Connectivity Center: Expanding SD-WAN’s Reach With New Partners

Related Posts