简体   繁体   English

用于数据迁移的 AWS 设置

[英]AWS setup for Migration of Data

Current setup:当前设置:

  1. We have users table in database clientdb1 (RDS)我们在数据库clientdb1(RDS)中有用户表
  2. We have users table in database clientdb2 (RDS)我们在数据库clientdb2(RDS)中有用户表
  3. We have users_profile table in database clientdb3 (RDS)我们在数据库 clientdb3 (RDS) 中有 users_profile 表

Details:细节:

  1. users table in clientdb2 has a different structure from users in clientdb1 clientdb2 中的 users 表与 clientdb1 中的 users 表具有不同的结构
  2. clientdb1 and clientdb2 although different database, are both Oracle 12c clientdb1 和 clientdb2 虽然不同的数据库,但都是 Oracle 12c
  3. clientdb3 is a SQL Server db clientdb3 是 SQL 服务器数据库

Problem:问题:

  1. migrate data from users (in clientdb1) to users (clientdb2).将数据从用户(在 clientdb1)迁移到用户(clientdb2)。 All fields in both tables are the same, they are just structured differently and with different column names, plus the latter has some additional columns.两个表中的所有字段都是相同的,它们只是结构不同并且具有不同的列名,而且后者还有一些额外的列。
  2. this is what makes it complicated, in the process of migration, each user record needs to get additional information from users_profile table in clientdb3 before the record is inserted in clientdb2.这就是复杂的地方,在迁移过程中,每条用户记录在插入到clientdb2之前,都需要从clientdb3中的users_profile表中获取额外的信息。

My design options:我的设计选项:

  1. Is this possible to do via DMS?这可以通过 DMS 进行吗? I tried doing research and all I could find were samples of data movement between two databases, no third one.我试着做研究,我能找到的只是两个数据库之间的数据移动样本,没有第三个。

  2. Is the best solution for this combination of DMS and Lambda?这种 DMS 和 Lambda 组合的最佳解决方案是什么? This is the one I have come up with let me know if this is ok, or is there a better way?这是我想出的,让我知道这是否可以,或者有更好的方法吗?

Part 1: Setup dms to migrate data from users (clientdb1) to a temp table in clientdb2 Part 2: Create a lambda worker that listen to data inserts in the temp table when query the needed data in clientdb3 then finally insert it in users (clientdb2).第 1 部分:设置 dms 以将数据从用户(clientdb1)迁移到 clientdb2 中的临时表第 2 部分:创建 lambda 工作人员,当在 clientdb3 中查询所需数据时侦听临时表中插入的数据,然后最终将其插入用户(clientdb2 )。

Any advice would be appreciated.任何意见,将不胜感激。 Thanks谢谢

It sounds like you simply need columns renamed from DB1 to DB2.听起来您只需要将列从 DB1 重命名为 DB2。 You can do that on the fly with DMS transformations.您可以使用 DMS 转换即时执行此操作。 Read more on that here: AWS DMS Transformations .在此处阅读更多信息: AWS DMS 转换 Have a look, you can do a lot within DMS.看看,你可以在 DMS 中做很多事情。

To add additional columns, just add them to the table in the 2nd database, as empty columns, and then DMS will populate them from table in 1st database.要添加其他列,只需将它们作为空列添加到第二个数据库中的表中,然后 DMS 将从第一个数据库中的表中填充它们。

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

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