Some CDC Rows From Postgres to Oracle Fail With Wrong Date Format

0

Hi all ... We see such failures in apply_exceptions table on the target Oracle DB. I know we can resolve it by including a transformation rule in the mappings.json to transform date format.

Do I have to include a transformation rule for every effected column (DATE datatype)? I could not find a way to include this as part of the endpoint extra settings.

Is including transformation rule the only option?

Thanks

질문됨 2년 전263회 조회
1개 답변
0

Yes, the ‘Wrong Date Format’ error in heterogeneous migration is a result of incompatible or unsupported Date format at the Target database (Oracle).

The workaround here can be using the Transformational rule parameter "rule-action": "change-data-type" to transform the source datatype into the desired/supported datatype at the target during migration.

Example:

{
    "rule-type": "transformation",
    "rule-id": "1",
    "rule-name": "RuleName 1",
    "rule-action": "change-data-type",
    "rule-target": "column",
    "object-locator": {
        "schema-name": "dbo",
        "table-name": "dms",
        "column-name": "SALE_AMOUNT"
    },
    "data-type": {
        "type": "int8"
    }
}

Fortunately, you do not have to include transformational rule for every affected column if you are aware of the schema, tables and datatype that requires this transformation.

You can use the ‘object-locator’ parameter to identify the columns by specifying their datatype that requires the transformation.

Example:

"object-locator": { 
    "schema-name": "dbo", 
    "table-name": "dms", 
    "column-name": "%", 
    "data-type": "int2"
},
"data-type": { 
    "type": "int8" }

Here, all the columns with data-type int2 at the source table dbo.dms would be transformed to int8 datatype. Likewise, you can make use of ‘%’ operator for “table-name” parameter if you have to apply this rule for multiple tables.

Source: https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Transformations.html#CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Transformations.Examples

AWS
지원 엔지니어
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠