Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

How to Convert XML file into CSV file using NIFI

avatar
New Member

i have XML files about 1-2 GB i want it to convert into CSV format using apache nifi.

so that i can process CSV for joining the two csv.

1 ACCEPTED SOLUTION

avatar
Guru

Hi @Nitin Damle

You can use the ConvertRecord processor (with XMLReader/CSVRecordSetWriter controller services). I have an article here that shows CSV to XML (with CSVReader/XMLRecordSetWriter controller services), so you just need to do the inverse of that record transformation:

https://community.hortonworks.com/content/kbentry/199310/xml-record-writer-in-apache-nifi-170.html

-Andrew

View solution in original post

22 REPLIES 22

avatar
New Member

@Max Börebäck can you upload the template here

avatar
Visitor

I have uploaded a NiFi example template on https://github.com/maxbback/nifi-xml

avatar
Visitor

Depending on the complexity

But one option is to use the built in converters Another Option is to use this groovy script

 

https://github.com/maxbback/nifi-xml