Created 12-14-2022 10:53 PM
I am trying to write the below query in getMongo processor
{"updatedAt" : {$gt : 2022-12-10}}
But it is showing an error stating that query is not a valid JSON representation. I tried adding double quotes as well but when I run it, it doesn't show any error nor any results in success, failure or original nodes.
My end goal is to fetch incremental data i.e. only the new data added daily (day -1) using "updatedAt" field. Kindly help me with this
Created 12-15-2022 06:12 AM
@Jaimin7 assuming "gt" is your parameter, that would be referenced as #{gt} and i think would be:
{"updatedAt" : {#{gt} : 2022-12-10}}
If "gt" is your variable, that would be represented as ${gt} and that would then be:
{"updatedAt" : {${gt} : 2022-12-10}}
Preference going forward is to use Paramaters as Variables will be going away soon.
Created 12-15-2022 09:14 PM
@steven-matison Hello, gt is supposed to be greater than right ? I want to have a date filter/condition stating my date column("updatedAt") should be greater than yesterday i.e. to fetch only the daily new records from my mongoDb database
Created 12-16-2022 04:43 AM
Ahh my confusion, it is hard to assume without a lot more detail.
Reference: https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#gt
${fileSize:gt( 1024 )}
You need to use the expression "gt( some value )" against a parameter or variable. In the case above, "file size greater than 1024".