amazon web services - Map attributes in DynamoDB table while migrating data -


i have 2 dynamodb tables following items:

table_1

  • someid: string

  • name: string

table_2

  • id: string

  • name: string

  • surname: string

this need:

  1. migrate data table_1 table_2.
  2. map table_1.someid attribute table_2.id attribute
  3. while migrating set default values table_2.surname

i took of amazon data pipeline service. apparently, can export data table_1 s3. , then, import data s3 table_2.

http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/dynamodbpipeline.html

what cannot see how map attributes if tables have different schema.

i found solutions base on writing console application scratch using sdk. better advice on this?

i think 1 way of solving use hive. can load data dynamo s3, use emr cluster run hive script , export s3 dynamo.

there quite similar example here: https://github.com/awslabs/data-pipeline-samples/tree/master/samples/dynamodbtoredshiftconvertdatausinghive

in example after transformation data put redshift can replace step import step.

alternatively, take sample: https://github.com/awslabs/data-pipeline-samples/blob/master/samples/dynamodb-to-dynamodb/pipeline.json

and add hive on emr previous sample in middle.

hope helps.


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -