0
votes

I have a DynamoDB table with hundreds of thousands of data, which I need it duplicated, with one catch that the key needs to be modified. The current key is a combination of 2 fields, e.g. attr1:attr2. I need the new table to have the key consisted only from attr1.

I know copying the table with Data pipelines is pretty straight forward, but how do I do the new key creation according to the use case I have?

Note: the data size is between 500K and 1M items.

1

1 Answers

0
votes

Use Elastic Map Reduce in order to manipulate the data. This article explains how to handle DynamoDB data with EMR. Create a UDF which will parse and manipulate the key and use that in a comprehensive

    SELECT UDF(id), all, other, columns FROM your_table

Which will be saved in another DynamoDB table.