Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to set time range in getmongo processor in nifi

Unable to set time range in getmongo processor in nifi

Explorer

Hi,

I have the below query:

db.getCollection("sourcing_resp").find({"header.timestamp":{

$gte: ISODate("2018-11-10T10:42:00.875"),

$lte: ISODate("2018-11-19T13:42:30.875")

}})

This works fine from the mongo shell, but in case I try to run the same from the getMongo processor, its not fetching any data. below is the query field data:

{"header.timestamp": { "$gte": "2018-11-10T10:42:00.875", "$lte": "2018-11-19T13:42:30.875" }}

Any suggestion on what could I be doing wrong?

Also ideally I want something like this:

{"header.timestamp": "$gte":"${http.param.startTimeStamp}.toDate(\"yyyy/MM/ddTHH:mm:ss\",\"GMT\")", "$lte":"${http.param.endTimeStamp}.toDate(\"yyyy/MM/ddTHH:mm:ss\",\"GMT\")" }

Don't have an account?
Coming from Hortonworks? Activate your account here