Created 07-20-2024 05:51 PM
Hi,
Another option is to use FreeFormTextRecrodSetWriter for that. The documentation is lacking about this unfortunately but you can find some examples like this if you google it.
All you need is a ConvertRecord processor to get the desired result. here is an example :
- GenerateFlowFile is to simulate generating the csv input:
- ConvertRecord: which takes the CSV input using CSVReader and Record Writer using the FreeFormTextRecordSetWriter:
- CSVReader Service Configuration: You can use default configuration.
-FreeFormTextRecordSetWriter:
The Text used in the above Service to provide desired output:
username = ${username}
first name = ${"first name"}
middle name = ${"middle name"}
last name = ${"last name"}
Output:
username = test_user
first name = test_FN
middle name = test_MN
last name = test_LN
username = test_user2
first name = test2_FN
middle name = test2_MN
last name = test2_LN
Hope that helps.