You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Bhasker gaddam <bh...@gmail.com> on 2018/11/28 16:48:05 UTC

Merge multiple xml files into one file

In my use case I want to merge multiple .xml files into single file by
using of Apache nifi.

My xml file are end with .gz format , could  you please help me to how to
implement merging xml files into single or some number (5 or 10) files.




Thanks,
Bhasker Gaddam

Re: Merge multiple xml files into one file

Posted by Koji Kawamura <ij...@gmail.com>.
Hi Bhasker,

MergeRecord processor can do the job.
If your XML files are compressed, you can use CompressContent with
'decompress' mode in front of MergeRecord.

Please refer this NiFi flow template as an example for MergeRecord
merging multiple XML files.
https://gist.github.com/ijokarumawak/eeaf519a7ceea476fa452f7aa2ee5671

Also, the additional detail for XMLRecordSetWriter can be helpful.
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-record-serialization-services-nar/1.8.0/org.apache.nifi.xml.XMLRecordSetWriter/additionalDetails.html

Hope this helps.

Thanks,
Koji

On Thu, Nov 29, 2018 at 2:40 AM Bhasker gaddam <bh...@gmail.com> wrote:
>
> In my use case I want to merge multiple .xml files into single file by
> using of Apache nifi.
>
> My xml file are end with .gz format , could  you please help me to how to
> implement merging xml files into single or some number (5 or 10) files.
>
>
>
>
> Thanks,
> Bhasker Gaddam