Created 03-02-2024 04:16 AM
Hello Team,
However, this approach did not yield the desired outcome.
Created 03-02-2024 06:18 AM
It seems you are using Literal Value in the Replacement Value Strategy of the second UpdateRecord. I think it needs to be "Record Path Value" since you are referencing another field from the content data itself.
If that helps please accept solution.
Thanks
Created 03-02-2024 06:18 AM
It seems you are using Literal Value in the Replacement Value Strategy of the second UpdateRecord. I think it needs to be "Record Path Value" since you are referencing another field from the content data itself.
If that helps please accept solution.
Thanks
Created on 03-02-2024 06:44 AM - edited 03-02-2024 06:56 AM
Thank you very much @SAMSAL . Do we need to provide the JsonPath expressions ? I had simplifed data using JOLT Spec so I am getting flat JSON so below has worked. What about if we have structured data ?
Another Question: what if I wanted to write the calculation on column rather than filed.value ? something like below ?
Created 03-02-2024 07:55 AM
Hi @saquibsk ,
The UpdateRecord processor uses the Nifi Record Path syntax to traverse record structure :
https://nifi.apache.org/docs/nifi-docs/html/record-path-guide.html
When your Replacement Value Strategy is set to Record Path Value then the path has to adhere to the record path syntax as explained in the link. The record path allows you to update structured data even if you have more than one record in an array of records. Please see the documentation here as well for more help:
If you are having more issues it would help to provide sample input and the expected output result alongside the relevant processors configuration screenshot. This will enable the community to help you better and resolve your issue faster.
If you find this is helpful please accept solution.
Thanks