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]

Community Articles

Find and share helpful community-sourced technical articles.
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!
Labels (1)
avatar
Super Guru

This has been a recurring question in the Community forum. I replied to those a few times so I've decided to post the answer here as an article so that's easier to find and reference.

 

The question is: if you have a ZIP file that contains other ZIP files (which may in turn contain other ZIP files, etc.), how can I extract all the ZIP files, recursively, using NiFi?

 

One way to do that is to implement the following data flow:

 

araujo_0-1655939220577.png

 

The RouteOnAttribute processor checks the file name and if it's a ZIP file it sends it for unpacking. Otherwise sends the non-zip file downstream.

 

araujo_1-1655939264495.png

 

You can find the flow definition attached below.

 

HTH,

André

3,327 Views
Comments
avatar

@araujo It would be awesome if you could also link a flow definition file.... 

avatar
Super Guru

Good idea, @steven-matison .

I've attached the flow above.

Version history
Last update:
‎06-23-2022 10:46 PM
Updated by:
Contributors