Member since
06-18-2018
3
Posts
0
Kudos Received
0
Solutions
06-19-2018
08:02 PM
Appreciate the feedback. After your first answer I decided to go a slightly different way. I can insert a timestamp as another JSON element and use that. I can then use that column later in QueryDatabaseTable so that I retrieve only new rows in the target table. That seems to work fine.
... View more
06-19-2018
04:54 PM
Thanks, Bryan. I was talking about a processor property,. I wanted to add the value of that property to a JSON record as an attribute, incrementing that value in each flowfile record the ExecuteScript receives. I'll have to determine another way to 'persist' a value between executions of the processor.
... View more
06-19-2018
01:28 PM
I have an ExecuteScript processor that needs to add an attribute to an outgoing flowfile (JSON). However, i need that attribute's value to increment. I've tried to access the processor's property (myAttribute) via (var myAttr = session.getAttribute(flowfile, 'myAttribute')), but the non-zero value is never retrieved. I want to increment that value and then put it back into the processor (here, I tried session.putAttribute(flowfile, "myAttribute", myAttr + 1), as well as add it to the outgoing JSON.
... View more
Labels:
- Labels:
-
Apache NiFi