Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Who agreed with this solution

avatar
Super Guru

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 :

 

SAMSAL_0-1721522523885.png

 

- GenerateFlowFile is to simulate generating the csv input:

SAMSAL_1-1721522582667.png

- ConvertRecord: which takes the CSV input using CSVReader and Record Writer using the FreeFormTextRecordSetWriter:

SAMSAL_2-1721522654799.png

 

- CSVReader Service Configuration: You can use default configuration.

SAMSAL_3-1721522763819.pngSAMSAL_4-1721522783848.png

 

-FreeFormTextRecordSetWriter:

SAMSAL_5-1721522846611.png

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.

 

 

 

 

 

 

 

View solution in original post

Who agreed with this solution