0

I am new to NiFi, and I am currently working on a task where I have a flowfile:

"a","b","c","d"
"abc","jfx","daw","123"
"eqw","poq","djw","456"

And another flowfile:

"d","e","f","g"
"123","VVV","010","dv2"
"412","GGG","188","kw2"

I need to merge them into a single flowfile where columns "d" are the same. So I would get:

"a","b","c","d","e","f","g"
"abc","jfx","daw","123","VVV","010","dv2"
"eqw","poq","djw","456","","",""

The problem is, if the file1 doesn't find the same value od "d" in file2, I would like to look at other file2-s (not all the flowfiles will have the same values, but all of them will have the same columns) Thanks

I have tried MergeContent but it doesn't spit the right result. I am trying with fork enrichment and join enrichment but I am doing something wrong.

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90

1 Answers1

1

If one of your FlowFiles is a static CSV file, you could use LookupRecord with the other and configure the CSVRecordLookupService to match on column d. For more complex enrichment scenarios check out the ForkEnrichment and JoinEnrichment processors.

mattyb
  • 11,693
  • 15
  • 20