I have Zip file with some txt files and index file(csv) inside. How to add the fields in the each CSV record as attribute to Txt files matching its filename?
List of Files:
filename, Date, Origin, Owner
a.txt, 20190103, AT, WU
b.txt, 20190103, CT, WU
c.txt, 20190103, OT, XO
Once you use UnpackContent to unzip the file, each flowfile will be one CSV. You should then be able to use ExtractText to pick out the fields from the CSV that you want to turn into attributes. Use a regex to tell ExtractText where to find the value for each attribute.
Thank you for your response. But the zip file have some .txt files along with one .csv file. I want to add the csv field values as new attributes to .txt files if its filename matches.