Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

How to Convert XML file into CSV file using NIFI

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

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

New Contributor

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

New Contributor

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

 

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.