zipload#
Load data from a ZIP file.
Note
This guide explains how to configure the zipload instruction. To learn about another instruction, go back to the Custom scripts available in Adverity overview.
Introduction#
Use the zipload instruction to load data from a ZIP file.
When to use this instruction#
Use zipload when:
Your source data is delivered as one or more files inside a ZIP archive and you want to load them in a custom script.
You need to route different files from the same archive into different subtables using the Filemap configuration.
If you are loading a single, non-zipped file, consider the specific file-type instructions (for example csv, json, xlsx) instead.
Creating a custom script transformation using the zipload instruction#
To create and configure a custom script using the zipload instruction, follow these steps:
In the Instructions step, select the zipload instruction.
To configure the custom script instruction, fill in the following fields. Required fields are marked with an asterisk (*).
- Filemap
By default, data from all files contained in the ZIP archive is loaded to the same table.
To specify a subtable for each file’s data, follow these steps:
Click +.
In the field on the left, specify the name of the subtable.
In the field on the right, specify the name of the file.
Repeat the procedure above for each file contained in the ZIP archive.
As a result, data from each file contained in the ZIP archive is loaded to the specified subtable.
- Format
Specify the file format.
- Subtable
Enter the name for a subtable that you want to use within this custom script.
A subtable is a temporary table that only exists for this custom script. You can apply additional instructions within the same custom script to the subtable. However, the subtable cannot be used in any other custom scripts.
If a subtable does not exist for the current custom script, the transformation is applied to the data extract, and the enriched data is output into the subtable. If the subtable already exists for the custom script, the subtable is used as the input for the transformation and optionally as the output.