Thank you all for the feedback, I went ahead and ran this solution for my
use case:
Lots of big files that may or may not have the first line contain the word
ERROR ... if it has the word ERROR I need to remove that line.
1) RouteOnContent and added a property ERROR with "ERROR" as value and set
Joe,
In terms of updating a processor to better handle this, we could update
RouteText to do so. The idea being that if a large percentage of the time (say
> 80% of the time) the FlowFile routed to one of the relationships is a single,
contiguous subset of the data in the original FlowFile,
Juan,
I think RouteText is the right answer. It would indeed need to check
all lines to determine whether the condition is satisfied and to
remove the first line it will need to write out all the remaining
lines. If a majority of the input files do not have this problematic
header I'd use
Good afternoon all,,
I am trying to remove the first line of a file if it has a certain word in
it "ERROR"
I know it will exist only in the first line ( I can not fix the reason why
it gets put there )
These files are big and lots of them.
and I can not find a "fast" fix to pop the first line