Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

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