简体   繁体   English

适用于 MySQL Aurora 的 AWS DMS

[英]AWS DMS for MySQL Aurora

I am trying to replicate MySQL Aurora database to another MySQL Aurora.我正在尝试将 MySQL Aurora 数据库复制到另一个 MySQL Aurora。 Always its creating the database with the same name as source.始终创建与源同名的数据库。 Is there any way to specify the target DB name?有没有办法指定目标数据库名称? Mean, I want to replicate "x" table to A database to "x" table of B database.意思是,我想将“x”表复制到 A 数据库到 B 数据库的“x”表。

Ax => Bx斧头 => Bx

You can specify a table mapping rule for your DMS replication task as follows:您可以为 DMS 复制任务指定表映射规则,如下所示:

{

    "rules": [
        {
            "rule-type": "selection",
            "rule-id": "1",
            "rule-name": "1",
            "object-locator": {
                "schema-name": "public",
                "table-name": "%"
            },
            "rule-action": "include"
        },
        {
            "rule-type": "transformation",
            "rule-id": "2",
            "rule-name": "2",
            "rule-action": "rename",
            "rule-target": "table",
            "object-locator": {
                "schema-name": "public",
                "table-name": "old-table"
            },
            "value": "new-table"
        }
    ]
}

This will copy all tables from public schema and rename just the one you specify.这将从公共模式中复制所有表并仅重命名您指定的表。

Detailed documentation is here: https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.html详细文档在这里: https ://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.html

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

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