0

I have a source database that I am trying to replicate using AWS DMS.

In the source database there is table t with column c VARCHAR(100)

I want to copy source.t.c into two columns in the destination: destination.t.c and destination.t.another_c (ie two columns in the same table)

Note that:

  • destination.t.c has the same datatype as source.t.c
  • destination.t.another_c is VARCHAR(50) - truncation of data isn't a problem

I have tried this rule in the DMS configuration:

{
    "rule-type": "transformation",
    "rule-id": "2",
    "rule-name": "2",
    "rule-action": "add-column",
    "rule-target": "column",
    "object-locator": {
        "schema-name": "Test",
        "table-name": "t"
    },
    "value": "another_c",
    "expression": "$c",
    "data-type": {
        "type": "string",
        "length": 50
    }
}

But get the metadata transformations defined for table 't' were not performed as at least one of the transformation expressions contains an error.

Is there anything obviously wrong with the transformation rule? Is this the correct way to achieve what I want? Does a difference in datatype have any influence?

(just in case it's pertinent, this is from Aurora MySQL 2 to Aurora MySQL 3)

Update: I should have said, this is for a continuous synchronisation rather than a one-off copy.

Rich
  • 15,602
  • 15
  • 79
  • 126
  • Maybe just duplicate the column after the transfer? `UPDATE t set another_c = c` – Jerry Jul 21 '22 at 15:40
  • Yes, that would work but this is a continuous synchronisation, rather than a one-off. It's a good point, I'll update the question. Thanks for the suggestion! – Rich Jul 22 '22 at 06:07

0 Answers0