How to unzip multiple files from a zipped folder and store the filenames in a database

If you require to unzip a zipped folder which contains multiple files from an SFTP server and save the filenames in a database, please follow the below instructions:

Illustrated below is an example of a flow that has an SFTP trigger to check for new files every 10 minutes. If a new file is found, the flow will process, unzip a list of files from the zipped folder and then save the filenames to a MySQL table.

The SFTP source step is used to retrieve a file from the server. If a new file is found, the flow will begin processing and unzip the list of files that is in the zipped folder.

The Zip List reader step is added to unzip the file that is retrieved from the server as shown in the below image.

NB: Please note that this step only works for a zip extension.

The below page shows the output from the Zip List reader step that lists the files from the zip file.

In the MySQL destination step, an Upsert is done to check if the file name exists and to save any new file name in the table.

The SFTP Server trigger step will be added last to trigger when the flow should process. To set up a SFTP trigger to check for new files every 10 minutes, press the Control (Ctrl) button on your keyboard and left-click to select the required multiple timeslots from the list.