简体   繁体   中英

How to translate Aurora Mysql ddl to Redshift ddl

What would be the best way to list a serie of Auora Mysql ddl objects and translate them to Redshift ddl (data type mapping, PK, encoding)?

Im trying to migrate from Aurora Mysql to Redshift with lambdas, but I need to create target tables first. This operation has to be done before every load, so it needs to be automated.

This can be done using the Database Migration Service

You can use DMS for the following DDL operations, further actions would need to be performed by the Schema Conversion Tool :

  • Create table
  • Drop table
  • Rename table
  • Add column
  • Drop column
  • Rename column
  • Change column data type

When you use this service it would need to boot up a resource in your account to perform the operation, so be aware of this as it will have a cost to it.

You can do it with liquibase (or flyway) and jenkins for scheduling as seen in the aws blog .

  1. Liquibase's generateChangeLog can create a changelog representing the schema of your mysql db
  2. With the generated Changelog you can update the Redshift schema with the latest schema changes from your source

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM