Tri Susanti
Tri Susanti

Reputation: 13

Remove First Character and Comma Delimiter from header line csv using Apache-NiFi

I'm newbie in Apache-Nifi topic.

I have a csv with value :

id | title | value
a  | Mr    | 391
b  | Mrs   | 392

I use replaceText processor for ensure the header line with "#" as replace value and replacement strategy : Prepend and Evaluation Mode : Entire Text. Then I use routetext to get the headerline with configuration : Grouping Regular Expression : (.*?),.* and new property named header line with value #.

The result from those process is : "#id,title,value

I want to remove # and , from that result. How to do that?

Thanks

Upvotes: 1

Views: 1734

Answers (1)

Bryan Bende
Bryan Bende

Reputation: 18640

You should be able to use another ReplaceText processor with a pattern of something like (#|,) and an empty replacement value.

Upvotes: 1

Related Questions