Member since
07-29-2020
574
Posts
320
Kudos Received
175
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
247 | 12-20-2024 05:49 AM | |
281 | 12-19-2024 08:33 PM | |
293 | 12-19-2024 06:48 AM | |
243 | 12-17-2024 12:56 PM | |
234 | 12-16-2024 04:38 AM |
07-25-2024
10:53 AM
1 Kudo
Hi, Sorry for the delay. See if this will work: [
{
"operation": "shift",
"spec": {
"tiers": {
"*": {
"priceRuleAttributes": {
"*": {
"id": {
"PR_CURR_CONDITION": {
"@(2,values[0])": "paths.[&5].currencyCondition[#2].currency"
}
}
}
},
"rewards": {
"*": {
"changeType": "paths.[&3].calculatePrice[&1].calculationType",
"changeAmount": "paths.[&3].calculatePrice[&1].amount",
"changePercent": "paths.[&3].calculatePrice[&1].percentage",
"@(2,priceRuleAttributes)": {
"*": {
"id": {
"PR_CURR_CONDITION": {
"@(2,values[0])": "paths.[&7].calculatePrice[&4].Currency"
}
}
}
}
}
}
}
}
}
}
]
... View more
07-24-2024
06:03 AM
Hi @SAMSAL Good Day! We can generate the data in the required format using the FreeFormTextRecordSetWriter processor. As the next step, we need to convert this into parquet and store them in HDFS. We use the "ConvertRecord" processor to prepare the parquet format but do not have the FreeFormTextRecordSetReader. If we use CSV or some other reader, the output gets misaligned. So, Please help us with your expertise to convert the data from the FreeFormTextRecordSetWriter into parquet format and store them in the HDFS location. I appreciate any help you can provide.
... View more
07-23-2024
02:34 AM
1 Kudo
Hi @SushmaNaya , I believe this was asked before here but I dont think there is a way to do it in one shot. you probably have to do it in custom script like executeScript processor where you can have part of the data stored as an attributes (depending how big the part is ) and then the other part is your flowfile content or have both stored as attributes (not recommended). Once you get the flowfile the execute script will get the content of the flowfile and the other aprt form the attribute construct your multi part body and send it that way. By the way if you are using Nifi 2.0 you probably can utilize python extensions to create your own custom processor using pure python when you can use different packages to help you with that. You can find example here: https://community.cloudera.com/t5/Support-Questions/Nifi-1-18-multipart-form-data-with-binary-part-and-json-part/m-p/386351#M246014 https://www.w3schools.com/python/ref_requests_post.asp Hope that helps
... View more
07-18-2024
11:31 AM
1 Kudo
@carlosst Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks.
... View more
07-12-2024
10:18 AM
For jslt , like I said sometimes its easier to write and work with specially if you are trying to get\aggregate data from heavily nested structure. The other advantage jslt has its ability to traverse nested levels dynamically using recursive function calls for example lets say you are working with json structure but have no idea how many nested level it might have (see my json\jslt answer in the this post to get an idea what I mean by that ). On the other hand jolt appears to perform a little bit better in comparison but they are very close. In regards to your question you use the follow to extract single value for the path name: "@(2,values[0])": "paths.[&5].pathName"
... View more
07-11-2024
08:22 AM
can i get single value instead of array ? "branchName" : ["MEMBERS"] --> "branchName" : "MEMBERS" [ {
"ID" : "09878666",
"DATE" : "2022-01-01",
"NAME" : "test_1",
"branchName" : "MEMBERS",
}, {
"ID" : "09878666",
"DATE" : "2022-01-01",
"NAME" : "test_2",
"branchName" : "NON MEMBERS"
} ]
... View more
07-11-2024
03:44 AM
1 Kudo
Not sure why do you need to use the replace text processor in this case. I provided that in my sample above as an example anda a way to simulate getting new data by replacing the original content with something else. You can think of replaceText as if Im doing InvokeHttp and getting different flowfile content in the response releationship. If you got the data from module C just link directly to the join enrichment. As long as you have the correct writer\reader configured for each fork then you should be good.
... View more
07-11-2024
02:57 AM
2 Kudos
It all depends on the complexity of the data you are working with. If you are taking about data transformation (converting to timestamp, replacing quote, ...etc.) then maybe groovy is the way to go. JSLT has some function that can you help you accomplish this as well like string replace and parse-time functons but Im not sure that is everything. Im not sure where did you get the impression that the nifi community doesnt recommend using groovey and if you find an article about that please share. I think its more of an issue with your Boss not wanting you to do any scripting to avoid not having this supported by others than you. The processor is there for you to use. Actually there is a dedicated processor for groovey called ExecuteGroovyScript. I think the ExecuteScript processor might get deprecated since its redundant. The only issue that I can find that warns about this processor is the fact the script is getting compiled for every flowfile and that might get expensive and impact the performance if you have a big script and working with large data volume. To avoid running into those scenarios, Nifi provides other alternative like InvokeScriptedProcessor (using groovey as well) or develop your custom processor in java (.nar) where the code is compiled once and done. The jslt processor also re compiles the script but it uses caching to avoid having to do that every time. In terms which performs better: groovey or jslt? Im not sure and I have never tested but you can do some stress testing and let us know :).
... View more
07-10-2024
06:52 AM
Hi @zain99 , Thanks for your information. it definitely shed more light on why 3.12 is not working and how it need to be resolved. This however appears to have been addressed in 2.0.0M4 release. I have not tested it against 3.12 but I can see in the code its no longer using the find_module and using the find_spec instead. Thanks
... View more
07-01-2024
02:55 PM
1 Kudo
@Dave0x1 Typically MergeContent processor will utilize a lot of heap when the number of FlowFiles being merged in a single execution is very high and/or the size of the FlowFile's attributes are very large. While FlowFiles queued in a connection will have the FlowFile attributes/metadata held in NiFi heap, there is a swap threshold at which time NiFi swaps FlowFile attributes to disk. When it comes to MergeContent, FlowFile are allocated to bins (will still show in inbound connection count). FlowFiles allocated to bin(s) can not be swapped. So if you set min/max num flowfiles or min/max size to a large value, it would result in large amounts of heap usage. Note: FlowFile content is not held in heap by mergeContent. So the way to create very large merged files while keeping heap usage lower is by chaining multiple mergeContent processor together in series. So you merge a batch of FlowFiles in first MergeContent and then merge those into larger merged FlowFile in a second MergeContent. Also be mindful of extracting content to FlowFile attributes or generating FlowFile attributes with large values to help minimize heap usage. Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more