You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Igor Kravzov <ig...@gmail.com> on 2016/05/12 18:40:08 UTC

Build a CSV file using MergeContent processor

I have  workflow where EvaluateJson PR used to extract some values,
ReplaceText PR used to create a comma delimited line. Now I want to create
a CSV file from these lines  Currently using MeregeContent PR but it
concatenates result lines incited of placing each on a new line. Should I
just create a demarcatorfile with new line in it? Or there are other
options?

Thanks in advance.

Re: Build a CSV file using MergeContent processor

Posted by Igor Kravzov <ig...@gmail.com>.
Both options worked. Thanks guys.

On Thu, May 12, 2016 at 3:57 PM, Bryan Bende <bb...@gmail.com> wrote:

> When using the "text" strategy you may have to do shift+enter in the
> demarcator field to create a new line.
>
> On Thu, May 12, 2016 at 3:52 PM, Joe Witt <jo...@gmail.com> wrote:
>
>> Igor,
>>
>> I believe it will encode whatever you give it in UTF-8 and place those
>> bytes in.  For absolute control over the content of the demarcator
>> that gets injected between each merged thing use the delimiter
>> strategy of 'filename' and point at a file containing precisely the
>> bytes you want.
>>
>> Thanks
>> Joe
>>
>> On Thu, May 12, 2016 at 3:49 PM, Igor Kravzov <ig...@gmail.com>
>> wrote:
>> > Joe, If I put \n or '\n' the processor adds at as a string. How do i
>> add it
>> > as ASCII?
>> >
>> > On Thu, May 12, 2016 at 2:43 PM, Joe Witt <jo...@gmail.com> wrote:
>> >>
>> >> Igor,
>> >>
>> >> MergeContent [1] has a property for this purpose called "Demarcator"
>> >> and you can set the "Delimiter Strategy" to "text" and put a value for
>> >> the demarcator of \n.
>> >>
>> >> That should get you there I think.
>> >>
>> >> [1]
>> >>
>> https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.MergeContent/index.html
>> >>
>> >> Thanks
>> >> Joe
>> >>
>> >> On Thu, May 12, 2016 at 2:40 PM, Igor Kravzov <ig...@gmail.com>
>> >> wrote:
>> >> > I have  workflow where EvaluateJson PR used to extract some values,
>> >> > ReplaceText PR used to create a comma delimited line. Now I want to
>> >> > create a
>> >> > CSV file from these lines  Currently using MeregeContent PR but it
>> >> > concatenates result lines incited of placing each on a new line.
>> Should
>> >> > I
>> >> > just create a demarcatorfile with new line in it? Or there are other
>> >> > options?
>> >> >
>> >> > Thanks in advance.
>> >
>> >
>>
>
>

Re: Build a CSV file using MergeContent processor

Posted by Bryan Bende <bb...@gmail.com>.
When using the "text" strategy you may have to do shift+enter in the
demarcator field to create a new line.

On Thu, May 12, 2016 at 3:52 PM, Joe Witt <jo...@gmail.com> wrote:

> Igor,
>
> I believe it will encode whatever you give it in UTF-8 and place those
> bytes in.  For absolute control over the content of the demarcator
> that gets injected between each merged thing use the delimiter
> strategy of 'filename' and point at a file containing precisely the
> bytes you want.
>
> Thanks
> Joe
>
> On Thu, May 12, 2016 at 3:49 PM, Igor Kravzov <ig...@gmail.com>
> wrote:
> > Joe, If I put \n or '\n' the processor adds at as a string. How do i add
> it
> > as ASCII?
> >
> > On Thu, May 12, 2016 at 2:43 PM, Joe Witt <jo...@gmail.com> wrote:
> >>
> >> Igor,
> >>
> >> MergeContent [1] has a property for this purpose called "Demarcator"
> >> and you can set the "Delimiter Strategy" to "text" and put a value for
> >> the demarcator of \n.
> >>
> >> That should get you there I think.
> >>
> >> [1]
> >>
> https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.MergeContent/index.html
> >>
> >> Thanks
> >> Joe
> >>
> >> On Thu, May 12, 2016 at 2:40 PM, Igor Kravzov <ig...@gmail.com>
> >> wrote:
> >> > I have  workflow where EvaluateJson PR used to extract some values,
> >> > ReplaceText PR used to create a comma delimited line. Now I want to
> >> > create a
> >> > CSV file from these lines  Currently using MeregeContent PR but it
> >> > concatenates result lines incited of placing each on a new line.
> Should
> >> > I
> >> > just create a demarcatorfile with new line in it? Or there are other
> >> > options?
> >> >
> >> > Thanks in advance.
> >
> >
>

Re: Build a CSV file using MergeContent processor

Posted by Joe Witt <jo...@gmail.com>.
Igor,

I believe it will encode whatever you give it in UTF-8 and place those
bytes in.  For absolute control over the content of the demarcator
that gets injected between each merged thing use the delimiter
strategy of 'filename' and point at a file containing precisely the
bytes you want.

Thanks
Joe

On Thu, May 12, 2016 at 3:49 PM, Igor Kravzov <ig...@gmail.com> wrote:
> Joe, If I put \n or '\n' the processor adds at as a string. How do i add it
> as ASCII?
>
> On Thu, May 12, 2016 at 2:43 PM, Joe Witt <jo...@gmail.com> wrote:
>>
>> Igor,
>>
>> MergeContent [1] has a property for this purpose called "Demarcator"
>> and you can set the "Delimiter Strategy" to "text" and put a value for
>> the demarcator of \n.
>>
>> That should get you there I think.
>>
>> [1]
>> https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.MergeContent/index.html
>>
>> Thanks
>> Joe
>>
>> On Thu, May 12, 2016 at 2:40 PM, Igor Kravzov <ig...@gmail.com>
>> wrote:
>> > I have  workflow where EvaluateJson PR used to extract some values,
>> > ReplaceText PR used to create a comma delimited line. Now I want to
>> > create a
>> > CSV file from these lines  Currently using MeregeContent PR but it
>> > concatenates result lines incited of placing each on a new line. Should
>> > I
>> > just create a demarcatorfile with new line in it? Or there are other
>> > options?
>> >
>> > Thanks in advance.
>
>

Re: Build a CSV file using MergeContent processor

Posted by Igor Kravzov <ig...@gmail.com>.
Joe, If I put \n or '\n' the processor adds at as a string. How do i add it
as ASCII?

On Thu, May 12, 2016 at 2:43 PM, Joe Witt <jo...@gmail.com> wrote:

> Igor,
>
> MergeContent [1] has a property for this purpose called "Demarcator"
> and you can set the "Delimiter Strategy" to "text" and put a value for
> the demarcator of \n.
>
> That should get you there I think.
>
> [1]
> https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.MergeContent/index.html
>
> Thanks
> Joe
>
> On Thu, May 12, 2016 at 2:40 PM, Igor Kravzov <ig...@gmail.com>
> wrote:
> > I have  workflow where EvaluateJson PR used to extract some values,
> > ReplaceText PR used to create a comma delimited line. Now I want to
> create a
> > CSV file from these lines  Currently using MeregeContent PR but it
> > concatenates result lines incited of placing each on a new line. Should I
> > just create a demarcatorfile with new line in it? Or there are other
> > options?
> >
> > Thanks in advance.
>

Re: Build a CSV file using MergeContent processor

Posted by Igor Kravzov <ig...@gmail.com>.
Oh.. Thanks Joe. I missed this property :(

On Thu, May 12, 2016 at 2:43 PM, Joe Witt <jo...@gmail.com> wrote:

> Igor,
>
> MergeContent [1] has a property for this purpose called "Demarcator"
> and you can set the "Delimiter Strategy" to "text" and put a value for
> the demarcator of \n.
>
> That should get you there I think.
>
> [1]
> https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.MergeContent/index.html
>
> Thanks
> Joe
>
> On Thu, May 12, 2016 at 2:40 PM, Igor Kravzov <ig...@gmail.com>
> wrote:
> > I have  workflow where EvaluateJson PR used to extract some values,
> > ReplaceText PR used to create a comma delimited line. Now I want to
> create a
> > CSV file from these lines  Currently using MeregeContent PR but it
> > concatenates result lines incited of placing each on a new line. Should I
> > just create a demarcatorfile with new line in it? Or there are other
> > options?
> >
> > Thanks in advance.
>

Re: Build a CSV file using MergeContent processor

Posted by Joe Witt <jo...@gmail.com>.
Igor,

MergeContent [1] has a property for this purpose called "Demarcator"
and you can set the "Delimiter Strategy" to "text" and put a value for
the demarcator of \n.

That should get you there I think.

[1] https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.MergeContent/index.html

Thanks
Joe

On Thu, May 12, 2016 at 2:40 PM, Igor Kravzov <ig...@gmail.com> wrote:
> I have  workflow where EvaluateJson PR used to extract some values,
> ReplaceText PR used to create a comma delimited line. Now I want to create a
> CSV file from these lines  Currently using MeregeContent PR but it
> concatenates result lines incited of placing each on a new line. Should I
> just create a demarcatorfile with new line in it? Or there are other
> options?
>
> Thanks in advance.