Support Questions

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

How best to replace all TABs (​\t) by COMMAs (,) in the content of a NiFi flow file?

avatar
Explorer
 
1 ACCEPTED SOLUTION

avatar
Super Mentor

@Prabir Guha

You can use the replaceText processor to replace tabs with commas in a text/plain input file.

lets assume my input file's content has the following value:

15259-screen-shot-2017-05-09-at-115146-am.png

I could then configure my replaceText processor to do teh following:

15258-screen-shot-2017-05-09-at-114958-am.png

The Search Value is set to a tab.

The Replacement Value is set to a comma.

The resulting content is:

15260-screen-shot-2017-05-09-at-115249-am.png

Thanks,

Matt

View solution in original post

3 REPLIES 3

avatar
Super Mentor

@Prabir Guha

You can use the replaceText processor to replace tabs with commas in a text/plain input file.

lets assume my input file's content has the following value:

15259-screen-shot-2017-05-09-at-115146-am.png

I could then configure my replaceText processor to do teh following:

15258-screen-shot-2017-05-09-at-114958-am.png

The Search Value is set to a tab.

The Replacement Value is set to a comma.

The resulting content is:

15260-screen-shot-2017-05-09-at-115249-am.png

Thanks,

Matt

avatar
Explorer

@Matt Clarke "The Search Value is set to a tab." How should the search value TAB be set? '\t' or 0x09

avatar
Super Mentor

I literally hit the "tab" key on my keyboard.