nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Villard <pierre.villard...@gmail.com>
Subject Re: Remove top N lines from a text file
Date Wed, 28 Sep 2016 11:03:56 GMT
Hi Peter,

I would recommend you the following blog by Matt:
http://funnifi.blogspot.fr/2016/02/executescript-processor-replacing-flow.html

Pierre

2016-09-28 13:01 GMT+02:00 Andrew Grande <aperepel@gmail.com>:

> Groovy script or a simple sed command invoked via ExecuteStreamingCommand
> should do the job.
>
> Andrew
>
> On Wed, Sep 28, 2016, 12:18 AM Peter Wicks (pwicks) <pwicks@micron.com>
> wrote:
>
>> I have a CSV file where the first few lines are a summary of the report
>> parameters that were used to generate it. I want to strip these off in NiFi.
>>
>> I’ve considered using a RegEx to match the {N} top lines, but am
>> wondering of a Groovy script might be a better option?  I want to keep the
>> file intact, so splitting it by line ending and routing all of the lines
>> through a RouteByAttribute seems excessive.
>>
>>
>>
>> I’ve never built a Groovy script, any examples on how I might go about
>> this?
>>
>>
>>
>> Thanks,
>>
>>   Peter
>>
>

Mime
View raw message