Import a zip file containing multiple files in a data extension in Marketing Cloud

automationimportmarketing-cloud

I set up a File Transfer Activity in the automation in order to unzip a file, containing 5 files named for example file_01, where 01 increases until 05.
The Activity correctly unzips the file into 5 csv files in the Import folder.
Then, I would like to import these files into a Data Extension. How should I set the File Naming Pattern in the Import Activity in order to import all of the files?
Thank you

Best Answer

You should manually configure 5 separate Import File Activities with a hardcoded File Naming Pattern.

You cannot import several files with one Import File Activity at once and, unfortunately, there is also no option to dynamically pull the names of the unzipped files to set it inside the Import File Activity. You can only set time wildcards and Filedrop Substitution Strings, which won't help in your case.

There is this REST API undocumented endpoint to trigger a File Transfer:

Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
POST automation/v1/filetransfers/{FileTransfer_Id}/start/
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN

and I assumed it might bring back some results of unzipping the file but the response is empty.

Related Topic