Member since
09-05-2024
6
Posts
4
Kudos Received
0
Solutions
01-09-2025
05:38 AM
Thanks Shu, that was helpful!
... View more
12-06-2024
04:40 AM
1 Kudo
I was having similar issue, where I had around 7000+ flow files and I needed to merge them into one. Provided that, I didn't know what will be the exact number of flow files, I couldn't specify that number in Minimum Number of Entries attribute of mergeContent processor to make it only 1 flow file after merge. After trying a lot of things, including trying to count the flow files or induce a delay before sending them off to merge, I finally found the solution on the mergeContent documentation below : https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.6.0/org.apache.nifi.processors.standard.MergeContent/index.html#:~:text=The%20%27Defragment%27%20algorithm%20combines%20fragments%20that%20are%20associated%20by%20attributes%20back%20into%20a%20single%20cohesive%20FlowFile.%20The%20%27Bin%2DPacking%20Algorithm%27%20generates%20a%20FlowFile%20populated%20by%20arbitrarily%20chosen%20FlowFiles And there you go ! setting 'Merge Strategy' property to 'Defragment' and 'Attribute Strategy' property to 'Keep Only Common Attributes' fixes the problem for me. In all my flow files, they have common attributes and are now merged into a single flow file. The original question is from 2017, but I hope it helps out somebody else looking for an answer. You can check the original answer here https://stackoverflow.com/questions/56356164/nifi-merging-all-of-necessary-flowfile-in-one-shot-with-mergecontent-processor/79257994#79257994
... View more
12-03-2024
05:18 AM
1 Kudo
Hi @SAMSAL , Thanks for the link you provided in your answer, it helped me understand the use of forkEnrichement, while I was trying to figure out the use of joinEnrichement. In my case I am first reading a column from a database table, then I am reading a column from a csv file, I have to join the db column with the csv column in a certain way to get my desired result. So, what is done here is, the data from db is provided to fork enrichment, it makes two copies of it, one is called 'original' and the other is called 'enrichment'. Though I am not performing anything on the enrichment flow file, rather I am overwriting it with my csv data, because that's what I need to do later in join enrichment i.e. to join the data from db to csv data. I have achieved the same using another way previously, by adding a property to each set of data i.e. db one and csv one to identify them separately while joining them, then I am merging them and then using queryRecord to finally join them and extract the result set I need. However, if you have suggestions to achieve this in a better way, do share with us, thanks.
... View more
10-31-2024
06:17 AM
1 Kudo
That's perfect !
... View more
10-31-2024
01:59 AM
Thanks, prepend worked for me, I needed to add a comma before a value.
... View more
10-10-2024
06:55 AM
1 Kudo
I set the Translate Field Names to false, it started working, before this it was converting the primary key field to upper case, removing the underscore, so when I run the putSQL, it was throwing error, working fine now, thanks to your answer!
... View more