[英]Options to export selective data from one dynamodb table to another table in same region
Need to move data from one dynamodb table to another table after doing a transformation在进行转换后需要将数据从一个 dynamodb 表移动到另一个表
What is the best approach to do that最好的方法是什么
Do I need to write a script to read selective data from one table and put in another table我是否需要编写脚本从一个表中读取选择性数据并放入另一个表中
or Do I need to follow CSV export或者我需要按照 CSV 出口
You need to write a script to do so.您需要编写一个脚本来执行此操作。 However, you may wish to first export the data to S3 using DynamoDB's native function as it does not impact capacity on the table, ensuring you do not impact production traffic for example.
但是,您可能希望首先使用 DynamoDB 的原生 function 将数据导出到 S3,因为它不会影响表的容量,例如确保您不会影响生产流量。
If your table is not serving production traffic or the size of the table is not too large then you can simply use Lambda functions to read your items, transform and then write to the new table.如果您的表不服务生产流量或表的大小不是太大,那么您可以简单地使用 Lambda 函数来读取您的项目,转换然后写入新表。
If your table is large, you can use AWS Glue to achieve the same result in a distributed fashion.如果您的表很大,您可以使用 AWS Glue 以分布式方式实现相同的结果。
Is this a live table that is used on prod?这是在产品上使用的实时表吗?
If it is what I usually do is.如果是我平时做的就是。
This approach is the only one I found that can guarantee 100% uptime during the migration.这种方法是我发现的唯一一种可以保证迁移期间 100% 正常运行时间的方法。
If the table is not live then you can just export it to S3 and then import it into the new table如果该表不存在,那么您可以将其导出到 S3,然后将其导入到新表中
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBPipeline.html https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBPipeline.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.