Online Archive
Hi Team - With regards to Atlas Data lake and using Online Archive customer request to be able to have (Time + Query) i.e. anything that is older than 60 days that match X query.
4
votes
Felipe Munoz
shared this idea
-
AdminBenjamin (Admin, MongoDB) commented
This can actually be done today using $expr, here's an example where the magic number is just the number of days in milliseconds
{
"archive": true,
"$expr": {
"$lte": [
"$bucket_end_date",
{
"$subtract": [ "$$NOW", 146880000000 ] }
]
}
}