Hi

What about the ReplaceText. If you know it will always be 4 header lines,
you could use a regex like this: ^topic.*?$ ^.*?$ ^.*?$ ^.*?$
or using 4 ReplaceText after each other, only replacing First-Line.

regards
Jens M. Kofoed

Den fre. 31. jul. 2020 kl. 21.09 skrev gemlan123 <[email protected]>:

> I have some csv files with first few lines like this:
>
> topic: abc ,,
> some comments: xxx,,
> col1,col2,col3,flag
> ,,,,,
> ,,,col4,col5
> data1,data2,data3,data4,data5
> ......
>
> I want to parse the first 4 lines and have a flowfile like:
> col1,col2,col3,col4,col5
> data1,data2,data3,data4,data5
>
> try to use RouteText processor to achieve it and if possible try to avoid
> scan all the lines within the file.
>
>
>
>
>
> --
> Sent from: http://apache-nifi-users-list.2361937.n4.nabble.com/
>

Reply via email to