728x90
반응형
테이블 매핑
DMS 태스크 설정 시 옮겨야 하는 테이블들을 서로 매핑해 준다.
{
"rules": [
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"object-locator": {
"schema-name": "test",
"table-name": "test_data"
},
"rule-action": "include"
},
{
"rule-type": "selection",
"rule-id": "2",
"rule-name": "2",
"object-locator": {
"schema-name": "test",
"table-name": "test_info"
},
"rule-action": "include"
}
]
}
나는 json 형식으로 편집해서 매핑을 시켜준다
테이블 이름 변경
나는 대상 테이블이 서비스 중이라 데이터를 건드리지 못하는 경우 사용했다.
DMS 에는 테이블 매핑하는 규칙이 여러 가지 있다. 그중에 하나 소스 테이블을 rename 해서 대상 테이블에 복제하는 걸 해보겠다.
DMS 태스크 설정에서 위와 같이 입력하되 rule-type이 selection이 아닌 transformation으로 들어간다.
{
"rules": [
{
"rule-type": "selection",
"rule-id": "1",
"rule-name": "1",
"object-locator": {
"schema-name": "test",
"table-name": "test_data"
},
"rule-action": "include",
"filters": []
},
{
"rule-type": "transformation",
"rule-id": "2",
"rule-name": "2",
"rule-action": "rename",
"rule-target": "table",
"object-locator": {
"schema-name": "test",
"table-name": "test_data"
},
"value": "test_data_200610"
},
{
"rule-type": "selection",
"rule-id": "3",
"rule-name": "3",
"object-locator": {
"schema-name": "test",
"table-name": "test_info"
},
"rule-action": "include",
"filters": []
}
]
}
rule-type 이 transformation이고 이 depth안에 object-locator:table-name은 기존 테이블 명이 들어가고 value에 변경할 이름을 매핑해주면 된다.
task 정보에 매핑 규칙을 보면
이렇게 확인이 가능하다.
728x90
반응형
'개발 > AWS' 카테고리의 다른 글
AWS Lambda EFS 탑재 (0) | 2020.12.16 |
---|---|
AWS Lambda Create - 1 (0) | 2020.06.18 |
AWS RDS PROXY - 1 - RDS PROXY 설정 (0) | 2020.06.11 |
DMS - Database Migration Service - 2 - 타계정 DMS, VPC 라우팅 (0) | 2020.06.10 |
DMS - Database Migration Service - 1 - 시작하기 (0) | 2020.06.10 |