简体   繁体   中英

AWS DMS Migration S3 to dynamoDB of field type DATETIME showing wrong value

AWS DMS Migration S3 to DynamoDB of field type DATETIME showing wrong value. Hey So basically I tried to migrate a test file in S3 to DynamoDB.

I have created for the migration an EC2 instance with the relevant rule, vpc, source endpoint which is the s3, and target endpoint which is DyanmoDB

here is the CSV file I tried to migrate from s3:

11b88984-5219-4293-a9b0-c1490acfac4c,Todo,2020-10-25T15:39:37.041Z,hello,updatedA,2020-10-25T15:40:37.041Z
34f50253-a5fb-46ef-b25b-bd579eedf974,Todo,2020-10-25T14:49:26.059Z,hellos,updatedB,2020-10-25T14:50:26.059Z
4a48ff69-2419-4a27-bda9-029a0d4f8985,Todo,2020-10-25T14:51:02.531Z,helloss,updatedC,2020-10-25T14:52:02.531Z
64b2edbe-cdb9-4dbd-9434-85ba30188294,Todo,2020-10-25T14:53:20.638Z,hellosss,updatedD,2020-10-25T14:55:20.638Z

4 fields with 6 columns.

Here is the table scheme on the source endpoint of S3:

{
    "TableCount": "1",
    "Tables": [
        {
            "TableName": "Todo-vrcxborfrrb5dbwohv6u2mgo2q-dev",
            "TablePath": "dataMigration/Todo-vrcxborfrrb5dbwohv6u2mgo2q-dev/",
            "TableOwner": "dataMigration",
            "TableColumns": [
                {
                    "ColumnName": "id",
                    "ColumnType": "String",
                    "ColumnLength": "50",
                    "ColumnIsPk": "true"
                },
                {
                    "ColumnName": "__typename",
                    "ColumnType": "String",
                    "ColumnLength": "50"
                },
                {
                    "ColumnName": "createdAt",
                    "ColumnType": "DATETIME"
                },
                {
                    "ColumnName": "description",
                    "ColumnType": "String",
                    "ColumnLength": "50"
                },
                {
                    "ColumnName": "name",
                    "ColumnType": "String",
                    "ColumnLength": "50"
                },
                {
                    "ColumnName": "updatedAt",
                    "ColumnType": "DATETIME"
                }
            ],
            "TableColumnsTotal": "6"
        }
    ]
}

And Here is a photo of the Final table I received when the TASK finished,

在此处输入图像描述

you will see that the updatedAt field displaying wrong value, depending on his input from the csv, and createdAt working. I tried to recreate all didn't work.

Hope someone can help! Thanks!

there is configuration at amazon when using the DMS. you need to set the row separation to: \r\n instead of \n

default is: \n , but I am using windows when I did the csv, and windows default for going row down is: \r\n

So this should solve it:) and it should my issue.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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