Skip to main content
guha
Silver ⭐️
May 9, 2017
Solved

Replacing Tab Delimiters with Commas in FlowFile Content Using Apache NiFi

NULL

MattWho
MattWhoAnswer
Titanium ⭐️⭐️⭐️
May 9, 2017

@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

3 replies

MattWho
Titanium ⭐️⭐️⭐️
MattWhoAnswer
Titanium ⭐️⭐️⭐️
May 9, 2017

@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

Translate
guha
guhaAuthor
Silver ⭐️
May 9, 2017

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

Translate
MattWho
Titanium ⭐️⭐️⭐️
Titanium ⭐️⭐️⭐️
May 9, 2017

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

Translate