Created on 05-09-2018 10:37 AM - edited 08-18-2019 12:54 AM
I am using NiFi replacetext processor to delete some strings in csv file but somehow its not working.
Below is the search string:
(,Minutes.*\n|CellID|=|"|LogicRNCID|CGI|CellIndex|GCELL:LABEL)
below is snapshot:
Can anyone tell how to mention multiple string in search box and how to mention delete these in replacement value.
Created on 05-09-2018 11:09 AM - edited 08-18-2019 12:54 AM
Change the replace text Replacement Strategy to Regex Replace because you are using "|"(or operator) to search for all the possible instances in your input csv file by using Evaluation mode as Line-By-Line and change the Replacement value property to empty string.
.
Always Replace will replace the entire flowfile contents based on Evaluation mode property <value> without searching for any value.
ReplaceText Configs:-
Replacement Value as empty string
Search Value
(,Minutes.*\n|CellID|=|"|LogicRNCID|CGI|CellIndex|GCELL:LABEL)
Replacement Value
Empty string set //we are searching for all the values above and replacing them with empty string
Replacement Strategy
Regex Replace //interprets search value as regex and replaces matched value with replacement values
Evaluation Mode
Line-by-Line //Run the 'Replacement Strategy' against each line separately (Line-by-Line)
-
If the Answer addressed your question, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.
Created on 05-09-2018 11:09 AM - edited 08-18-2019 12:54 AM
Change the replace text Replacement Strategy to Regex Replace because you are using "|"(or operator) to search for all the possible instances in your input csv file by using Evaluation mode as Line-By-Line and change the Replacement value property to empty string.
.
Always Replace will replace the entire flowfile contents based on Evaluation mode property <value> without searching for any value.
ReplaceText Configs:-
Replacement Value as empty string
Search Value
(,Minutes.*\n|CellID|=|"|LogicRNCID|CGI|CellIndex|GCELL:LABEL)
Replacement Value
Empty string set //we are searching for all the values above and replacing them with empty string
Replacement Strategy
Regex Replace //interprets search value as regex and replaces matched value with replacement values
Evaluation Mode
Line-by-Line //Run the 'Replacement Strategy' against each line separately (Line-by-Line)
-
If the Answer addressed your question, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.
Created 05-09-2018 12:27 PM
Thanks it worked perfectly !!