I tried to join two csv file based on id with respect to the below reference.
How to join two CSVs with Apache Nifi
i'm using NiFi-1.3.0
Now i have two csv files.
1.custom.csv
No,Name,ID,Age
1,Hik,2201,33
2,Kio,3300,22
2.gender.csv
ID,Name,Sex
2201,Hik,Male
3300,Kio,Female
I try to combine those tables with "ID" like following endresult.
No,Name,Sex,ID,Age
1,Hik,Male,2201,33
2,Kio,Female,3300,22
I have using following processor structure.
GetFile-SplitText-ExtractText-LookUpRecord-PutFile
In that lookup record i have configured
RecordReader = "CSVReader"
RecordWriter="FreeFormTextRecordSetWriter"
LookUpService="SimpleCSVFileLookUpService"
ResultRecordPath-->/Key
key-->/ID
In that LookUpService i have given path of the "gender.csv" and setted LookUpKeyColumn and LookUpValueColumn to be "ID".
In that FreeFormTextRecordSetWriter i have given text value"${No},${Name},${ID},${Age},${Sex}"
It yields below result only.
No,Name,ID,Age,
1,Hik,2201,33,
2,Kio,3300,22,
It doesn't have "sex" column.
I think i haven't configured correctly.
i don't know how to use ResultRecordPath & one dynamic attribute(Key) specification in LookUpRecord?
Can anyone guide me to solve my issue?