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.

How to get ISO string in Nifi getMongo Query Field

Highlighted

How to get ISO string in Nifi getMongo Query Field

New Contributor

I'm trying to use expression languge to generate ISO string in Nifi getMongo Query field using following query,

{
"remindmeDate": {
"$gte": "${now():format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",'GMT')}",
"$lte": "${now():toNumber():plus(359999):format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",'GMT')}"
}
}

But i'm getting invalid JSON error error as double quotes are not escaped. When we try to escape it using \ operator, nifi is not evaluating the expression language. Is there any method or workaround to get this working ?

Thanks in advance

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