- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to extract a zip file that contains several other zips files
- Labels:
-
Apache NiFi
Created ‎03-23-2022 01:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I've zip file that contains several other zips files.
I want to extract the main ZIP and all other zips files (Recursive)
Can anyone please advise how to do this using NIFI ?
Created ‎03-24-2022 03:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Nifi_Al ,
Here's a way to do that:
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.
Cheers,
André
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Created ‎03-23-2022 02:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Nifi_Al Use getFile/putFile to read and write in your flow. Then If you use unpackContent against a zipped flowfile it should create individual artifacts flowfiles which can be additionally unzipped further. Alternatively, if you can create a script to unzip recursively, you can use nifi to executeScript. Maybe even use executeProcess too.
Created ‎03-24-2022 03:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Nifi_Al ,
Here's a way to do that:
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.
Cheers,
André
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
