Created 07-21-2021 08:10 AM
I have to create one attribute with the following details:
1. There are two attributes are flowing from EvaluateJson Proecessor :
Location1 = $.place1 and Location2 = $.place2
2. There is one string like folder1 is to be append in these attributes as mentioned below:
Place : /folder1/Location1/Location2
I am trying with the below expression:
path: ${path: append("folder1/"):append(${Location1}):append('/'):append(${Location2})}
Please let me know where I am doing wrong.
Early reply will be highly appreciated.
thanks & regards
Created 07-22-2021 07:32 AM
Your expression looks fine.
I just tested as follows:
1. Generateflowfile: Add property Location1, value loc1; Add property Location2, value loc2
followed by:
2. Updateattribute processor: Add property Total, value ${path: append("folder1/"):append(${Location1}):append('/'):append(${Location2})}
Now the output I get is ./folder1/loc1/loc2 which is exactly what I expected.
If you think there may be a problem with parsing the json inthe first place, please inspect your data in the queue directly after parsing, but the concatenation seems to work. (Unless you expected a different outcome, in which case please be very clear in what you expect and see).
Created 07-22-2021 07:32 AM
Your expression looks fine.
I just tested as follows:
1. Generateflowfile: Add property Location1, value loc1; Add property Location2, value loc2
followed by:
2. Updateattribute processor: Add property Total, value ${path: append("folder1/"):append(${Location1}):append('/'):append(${Location2})}
Now the output I get is ./folder1/loc1/loc2 which is exactly what I expected.
If you think there may be a problem with parsing the json inthe first place, please inspect your data in the queue directly after parsing, but the concatenation seems to work. (Unless you expected a different outcome, in which case please be very clear in what you expect and see).
Created 07-23-2021 12:38 AM
Thanks for your reply.
I a able to resolve this issue with your suggestion.
Thanks!