Skip to main content
av_venkatesh86
Silver ⭐️
February 6, 2019
Solved

Nifi Repalce text - double quotes to single quotes

Assistance required to replace double quotes with single quotes in Nifi Replace Text processor, Please assist.

Input: "162","298","99","1.5","3","7.46","0","0.53","1"

Output: '162','98','99','1.5','3','7.46','0','0.53','1'

Post 'Replace Text' i will pass on the values to Putsql processor which inserts data into Oracle, where double quotes for column value is not accepted.


replacetext.png
MattWho
MattWhoAnswer
Titanium ⭐️⭐️⭐️
February 6, 2019
@Venkatesh AV

-

Just want to make sure we are using correct processor for what you want to do:

The ReplaceText processor is used to replaceText in the content of the FlowFile.
The UpdateAttribute processor could be used to replace text contained within an attribute of a FlowFile.

-

Assuming the FlowFile content is where you want to replace double quote with single quote, the following ReplaceText processor configuration will do that for you:

-

103392-screen-shot-2019-02-05-at-20615-pm.png

-

Thank you,

Matt

-

If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link.

2 replies

MattWho
Titanium ⭐️⭐️⭐️
MattWhoAnswer
Titanium ⭐️⭐️⭐️
February 6, 2019
@Venkatesh AV

-

Just want to make sure we are using correct processor for what you want to do:

The ReplaceText processor is used to replaceText in the content of the FlowFile.
The UpdateAttribute processor could be used to replace text contained within an attribute of a FlowFile.

-

Assuming the FlowFile content is where you want to replace double quote with single quote, the following ReplaceText processor configuration will do that for you:

-

103392-screen-shot-2019-02-05-at-20615-pm.png

-

Thank you,

Matt

-

If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link.

Translate
av_venkatesh86
Silver ⭐️
February 6, 2019

Thanks for your response Matt.

It is working now with updateattribute processor as it's attribute level. Thumbs up to you

104401-replacetext-2.png

Translate