I have a dataset in dynamoDB that looks like this:
{
"userID" : 2323423,
"lt" : [
{
"timestamp" : epoch1,
"coordinates" : "coordinate1"
},
{
"timestamp" : epoch2,
"coordinates" : "coordinate2"
},
...
]
}
"lt" is a location tracking list that is designed to store coordinate values for a user ID at different times.
Q1 Requirement:
- Save location tracking data for a maximum of 1 day for each user, while automatic deletion occurs only when a new entry of LT coordinate data is received.
- What this means is, at the same time, there may be outdated LT data, each of which has a duration of 24 hours. However, as soon as new LT coordinate data appears, delete the obsolete records to delete records older than 24 hours.
, dynamoDB.
UpdateExpression: "REMOVE lt [0]" -
UpdateExpression: "REMOVE lt [0] lt [1]" - 0 1
, 24 . , , , , . - ?
Q2 :
N LT , "n" , 100 + "n" . 100, .
, , N "lt" , , , "n" , , " , " lt ".
, "lt" - Count, .
, ?