使用 boto3 Dynamodb 扫描有没有办法获取事件的变化而不是上次更新
With boto3 Dynamodb scan is there a way to get changes of events rather than last update
基于此答案:Complete scan of dynamoDb with boto3
我想要实现的是也获得每个项目的历史变化。例如,如果项目 1 随着时间发生了三个变化:
{
"item" : 1
"x" : "abc"
"time" : 1
}
{
"item" : 1
"x" : "efg"
"time" : 2
}
{
"item" : 1
"x" : "hij"
"time" : 3
}
扫描只会给我最新的,即
{
"item" : 1
"x" : "hij"
"time" : 3
}
有没有办法同时获得前两个更改?
Is there a way to get the previous two changes as well?
遗憾的是,除非您自己实施这样的解决方案,否则没有。可能您必须使用 DynamoDB Streams 将更改流式传输到 lambda 函数,然后将所有历史值存储在其他数据库中。
基于此答案:Complete scan of dynamoDb with boto3
我想要实现的是也获得每个项目的历史变化。例如,如果项目 1 随着时间发生了三个变化:
{
"item" : 1
"x" : "abc"
"time" : 1
}
{
"item" : 1
"x" : "efg"
"time" : 2
}
{
"item" : 1
"x" : "hij"
"time" : 3
}
扫描只会给我最新的,即
{
"item" : 1
"x" : "hij"
"time" : 3
}
有没有办法同时获得前两个更改?
Is there a way to get the previous two changes as well?
遗憾的是,除非您自己实施这样的解决方案,否则没有。可能您必须使用 DynamoDB Streams 将更改流式传输到 lambda 函数,然后将所有历史值存储在其他数据库中。