1

I am using UpdateRecord Processor in Nifi where I need to get value from one record path (/amount), add some value to it and put the resulting value to another record path (/result). I could not find any way of doing this. Any help would be great!!

UpdateRecord Screenshot

Lamanus
  • 12,898
  • 4
  • 21
  • 47

1 Answers1

0

Use UpdateRecord twice.

The first one is

Record Reader               CSVReader
Record Writer               CSVRecordSetWriter
Replacement Value Strategy  Record Path Value
/result                     /amount

and the second one is

Record Reader               CSVReader
Record Writer               AvroRecordSetWritter
Replacement Value Strategy  Literal Value
/result                     ${field.value:toNumber():plus(1000)}

where the answer is based on my the other answer, Add two columns together using apache-nifi

Lamanus
  • 12,898
  • 4
  • 21
  • 47