I am trying to get all documents within a time range using RunMongoAggreation.
In console I tried with below query and it worked fine.
db.collection.find(
{ "header.timestamp": {
$gte: ISODate("2018-12-20T05:19:35.904Z"),
$lt: ISODate("2018-12-20T05:21:44.509Z")
} }
)
Flowfile has below properties
startTimestamp: 2018-12-20T05:19:35.904Z
endTimestamp: 2018-12-20T05:21:44.509Z
Below is the query being used in RunMongoAggreation
{
"header.timestamp": {
"$gt": {
"$date": "${startTimestamp}"
},
"$lt": {
"$date": "${endTimestamp}"
}
}
}
Its not working gettting below exception
com.fasterxml.jackson.databind.exc.mismatchedinputexception cannot deserialize instance of `java.util.arraylist` out of START_OBJECT token