简体   繁体   English

如何将 Aurora Mysql ddl 翻译成 Redshift ddl

[英]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)?列出一系列 Auora Mysql ddl 对象并将它们转换为 Redshift ddl(数据类型映射、PK、编码)的最佳方法是什么?

Im trying to migrate from Aurora Mysql to Redshift with lambdas, but I need to create target tables first.我正在尝试使用 lambda 从 Aurora Mysql 迁移到 Redshift,但我需要先创建目标表。 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 :您可以将 DMS 用于以下 DDL 操作, 架构转换工具需要执行进一步的操作:

  • 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 .您可以使用 liquibase(或 flyway)和 jenkins 进行调度,如aws 博客中所示。

  1. Liquibase's generateChangeLog can create a changelog representing the schema of your mysql db Liquibase 的generateChangeLog可以创建一个更改日志,表示您的 mysql 数据库的架构
  2. With the generated Changelog you can update the Redshift schema with the latest schema changes from your source使用生成的变更日志,您可以使用源中最新的架构更改来更新Redshift 架构

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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