自动从 DynamoDb 表中删除数据 [英] Deleting Data from DynamoDb Table automatically

查看:22
本文介绍了自动从 DynamoDb 表中删除数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DynamoDB 中是否有任何生命保留期的概念.

Is there any kind of life retention period concept in DynamoDB.

我的意思是有什么方法可以在一段时间后删除表中的数据,就像我们可以在 S3 中设置一些保留期一样.

I mean is there any way such that data inside a table will be deleted after some time like we can set some retention period in S3.

谢谢,

推荐答案

不,DynamoDB 中没有可用的保留"设置.

No, there is no "retention" setting available in DynamoDB.

您可以运行使用日期字段过滤结果的每日/每月查询,并使用该输出来确定要删除的项目.这需要在您自己的编程代码中实现.

You could run a daily/monthly query that uses a date field to filter results, and use that output to determine which Items to delete. This would need to be implemented in your own programming code.

一些用户选择使用单独的表来提供老化.例如,为每个月创建一个单独的表.然后,一旦旧表超过一定年龄,就删除它们.但是,您的软件必须知道如何处理多个数据表.

Some users choose to use separate tables to provide ageing. For example, create a separate table for each month. Then, delete old tables once they pass a certain age. However, your software would have to know how to handle multiple tables of data.

例子:

这篇关于自动从 DynamoDb 表中删除数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆