在同一 AWS DMS 选择规则中包含和排除

问题描述 投票:0回答:1

看看这个规则:

{       "rule-type": "selection",       "rule-id": "8",       "rule-action": "exclude",       "object-locator": {         "table-name": "%_temp%",         "schema-name": "plf"       },       "rule-name": "8"     }

现在我想编辑此规则,使其仅采用表 xyz_temp 但排除其中包含“%_temp%”的所有其他表。

为了创建另一个规则来执行此操作,我们需要创建一个新的 DMS 任务。因此我想看看是否有可能通过单个规则实现这一目标。

我向 ChatGPT 询问了同样的问题,这是我得到的答复:

{   "rule-type": "selection",   "rule-id": "8",   "rule-action": "include",   "rule-name": "8",   "object-locator": {     "schema-name": "plf"   },   "exclude-object-pattern": "%_temp%",   "include-objects": [     {       "schema-name": "plf",       "table-name": "xyz_temp"     }   ] }

不确定这是否有效,因为我在文档中没有找到类似排除对象模式的内容!

amazon-web-services mapping cloud aws-dms
1个回答
0
投票

如果您只想从表 xyz_temp 迁移数据,只需在选择规则中指定该表即可。 DMS 任务仅从映射规则中提到的表迁移数据。当您在映射规则中指定表名称时,如果您只想从 xyz_temp 迁移,则不需要排除规则。

© www.soinside.com 2019 - 2024. All rights reserved.