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!

Nifi Repalce text - double quotes to single quotes

avatar
New Member

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
1 ACCEPTED SOLUTION

avatar
Master Mentor
@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.

View solution in original post

2 REPLIES 2

avatar
Master Mentor
@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.

avatar
New Member

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