Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on
10-10-2019
08:56 AM
- last edited on
10-10-2019
05:16 PM
by
ask_bill_brooks
Hello,
I would like to implement this logic on nifi:
I have a json array:
[
{
"att1": "1",
"att2": "aaa"
},
{
"att1": "2",
"att2": "bbb"
},
{
"att1": "3",
"att2": "aaa"
},
]
I would like that, according to the attribute, the json was processed to the processA or to the processB.
For example, if att2 is equal "aaa", it was processed to the processA, else it was processed to the processB.
I tried to follow the suggestion of the following solution
but it didn't work. Can you give me an alternative?
Thank you.
Created 10-11-2019 12:04 PM
Hi @LuxIsterica,
I would split your json (SplitJson) > EvaluateJsonPath ( To turn att2 to an attribute and call it an attribute name ) > RouteOnAttribute ( To see if the attribute name you grabbed equals to aaa ) > Route it either to you found a relationship or unmatched
Created 10-11-2019 12:04 PM
Hi @LuxIsterica,
I would split your json (SplitJson) > EvaluateJsonPath ( To turn att2 to an attribute and call it an attribute name ) > RouteOnAttribute ( To see if the attribute name you grabbed equals to aaa ) > Route it either to you found a relationship or unmatched
Created 10-13-2019 12:01 AM
Thank you so much!