You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Christopher Wilson <wi...@gmail.com> on 2015/10/01 23:12:22 UTC

MergeContent Question

I posted a question earlier today regarding pulling JSON out of a string
from a log file.  I want to aggregate those logs into a file using
ReplaceText and MergeContent processors.  I'm having an issue where the
aggregated logs are concatenated into one large string instead of line by
line (with a newline added to the end).

I've tried adding a '\n' after the replacement value in ReplaceText and
added the same string to a file in the Demarcator value in MergeContent but
still getting one REALLY long line in the output file.

Any help on the proper settings appreciated.

-Chris

Re: MergeContent Question

Posted by Bryan Bende <bb...@gmail.com>.
Hi Chris,

In the MergeContent case, instead of putting \n in the file, try putting a
new line by hitting return.

I remembering doing this once and I had created the empty file with vi and
added a new line, and then I actually got 2 new lines in my output because
I guess vi has a new line character in there by default. I think this was
specific to vi but thought I'd mention it.

-Bryan


On Thu, Oct 1, 2015 at 5:12 PM, Christopher Wilson <wi...@gmail.com>
wrote:

> I posted a question earlier today regarding pulling JSON out of a string
> from a log file.  I want to aggregate those logs into a file using
> ReplaceText and MergeContent processors.  I'm having an issue where the
> aggregated logs are concatenated into one large string instead of line by
> line (with a newline added to the end).
>
> I've tried adding a '\n' after the replacement value in ReplaceText and
> added the same string to a file in the Demarcator value in MergeContent but
> still getting one REALLY long line in the output file.
>
> Any help on the proper settings appreciated.
>
> -Chris
>