Member since
04-16-2023
15
Posts
0
Kudos Received
0
Solutions
06-14-2023
03:04 PM
Does it need to be ECMA? I can probably whip something up tomorrow using Groovy.
... View more
06-14-2023
01:21 PM
Do you have the code you're trying and a sample of the file causing/generating the error?
... View more
04-27-2023
04:55 AM
I'm receiving an array of the Json objects like [{"key1":"value1", "key2":"value2"},{...},{...}], all what I'm doing is using SplitJson with the following expression. If you have another structure of a Json your expression could be different, or you should use any transform(f.e. JoltTransform) at first.
... View more
04-25-2023
01:48 PM
@anony You can not use NiFi Expression Language (NEL) in component property names. NEL can only be used in component property values and even then, only when the component property supports Expression language. With ExtractText, any dynamic properties added will create a new FlowFile Attribute on the outbound FlowFile with an attribute name matching the property name "${reasonId}" and the attribute set the the capture group string extracted from the source FlowFiles content. Without understanding yoru complete use case, it is difficult to offer alternative possible solutions. Why is it important to set a FlowFile property name to a reasonID? FlowFile attribute property names only mean something to NiFi. So if you were able to create dynamic property names, then how would you programmatically use them later in your dataflow as FlowFiles will have a variety of Attribute property names? If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped. Thank you, Matt
... View more
04-25-2023
10:38 AM
Hi, Can you answer this question please How to do Dynamic property naming in NIfi? - Cloudera Community - 369374
... View more
04-22-2023
10:57 AM
Actually I want to extract all three or there can be more such like n options, So I need to extract all these n options, I explain it a bit wrong Sorry for that. All of them will have some values and I need to extract that one by one. I cant edit the question now, its not allowing. {
"status": "pass",
"values": {
"WorkFlow": 0,
"Reasons": {
"resID": "",
"options": {
"9876": [
"t1",
"t2"
],
"9875":[ "t1",
"c2"],
"9874":[ "x1",
"a2"]
}
}
}
} There can N number of options, not only these 3 (9876,9875,9874) and I have to extract all of those options because I have to run API using on all these values one by one thats why I have to extract them one by one and store them in some variable. Flow is like : First option(9876) will be extracted in some variable -> we will check if it is empty or not -> if not empty -> it will call an API using this(9876) option -> same will happen for all the option one by one. But I am unable to fetch these options one by one.
... View more
04-17-2023
12:50 PM
1 Kudo
@anony Let me see if i understand correctly your use case. InvokeHTTP (number 1) --> InvokeHTTP (number 2) -->loops back on invokeHTTP (number 2) until subId is empty and then exits loop? So InvokeHTTP1 makes initial call to get ID (ID-Orig). ID-Orig is then used by the second InvokeHTTP2 which may or may not have a return with a subID. Use new SubID each time to make another InvokeHTTP2 execution until return no longer has a SubID. correct? After invokeHTTP2, extract that SubID to a FlowFile attribute (SubID) --> RouteOnAttribute (use to valdiate attribute SubID is not null) --> IF NOT null send FlowFile back to invokeHTTP and IF null have FlowFile exit loop. If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped. Thank you, Matt
... View more