Skip to main content
guha
Silver ⭐️
May 9, 2017 10:41 PM UTC
Solved

Replacing Tab Delimiters with Commas in FlowFile Content Using Apache NiFi

NULL

MattWho
MattWhoAnswer
Titanium ⭐️⭐️
May 9, 2017 10:53 PM UTC

@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 10:53 PM UTC

@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 10:59 PM UTC

@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 11:05 PM UTC

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

Translate