Hello Again NiFi Team, In the meantime we came up with a (slightly sketchy) fix to put the flowfile through another ReplaceText processor and turn any instance of "$$" to "$" which works for now. I'm still interested to know if there is a better way, however.
Thanks! Paul On Tue, Jan 17, 2023 at 11:33 AM Paul Riddle <[email protected]> wrote: > Good Morning NiFi Team, > > I am trying to formulate a REST PUT in the payload of a flowfile using > ReplaceText 1.16.3, but I need for one of my expressions to not be > evaluated. > > Given the following: > ------------------------------------------------------------ > { > "component": { > "id": "92da314e-b519-1ff1-0000-00003c0e6b52", > "name": "RouteOnAttribute", > "config": { > "concurrentlySchedulableTaskCount": "1", > "schedulingPeriod": "0 sec", > "executionNode": "ALL", > "penaltyDuration": "30 sec", > "yieldDuration": "1 sec", > "bulletinLevel": "WARN", > "schedulingStrategy": "TIMER_DRIVEN", > "comments": "", > "runDurationMillis": 0, > "autoTerminatedRelationships": [ > "A_RELATIONSHIP", > "foo", > "unmatched" > ], > "retriedRelationships": [], > "properties": { > "foo": "${stream_set:equals('foo')}" > } > }, > "state": "STOPPED" > }, > "revision": ${processor_revision_version}, > "disconnectedNodeAcknowledged": false > } > ------------------------------------------------------------ > > I need for: > > "foo": "${stream_set:equals('foo')}" > > to not be evaluated as that is the value I am trying to insert into the > processor. After some research, I came across > https://docs.cloudera.com/cfm/2.1.3/nifi-express-guide/topics/nifi-expression-language-guide-escaping.html > and discovered that I should be able to add a $ in front of the expression > and yield the results I am hoping for, however, all I end up with in the > payload after trying that is: > > "foo": "$${stream_set:equals('foo')}" > > I have also tried a number of escaping techniques such as backslash to no > avail. Any suggestions you can offer are greatly appreciated. > > Thanks! > Paul >
