Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Nifi Repalce text - double quotes to single quotes

Solved Go to solution

Nifi Repalce text - double quotes to single quotes

New Contributor

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

Accepted Solutions
Highlighted

Re: Nifi Repalce text - double quotes to single quotes

Master Guru
@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
Highlighted

Re: Nifi Repalce text - double quotes to single quotes

Master Guru
@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

Highlighted

Re: Nifi Repalce text - double quotes to single quotes

New Contributor

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

Don't have an account?
Coming from Hortonworks? Activate your account here