ZIP Splitter
Overview
ZIP Splitter is a splitter that extracts the files contained in a ZIP and runs its context for each of them. In other words, at each iteration, the first context block after the splitter receives as input the output corresponding to a file extracted from the ZIP by ZIP Splitter.
Input
A ZIP Splitter block has these input variables:
base64
(string, required) Base64 encoding of the file.charset
(string, optional)path
(string, required): name or the path of the file. It is only for debugging, logging or auditing purposes, it is not used to "read" the file, which instead is completely represented by the value of thebase64
key.
Block properties
The properties of a ZIP Splitter block are accessed by editing the block and are divided into these groups:
-
Basic properties:
- Block name
- Component version (read only)
- Block ID (read only)
-
Deployment:
- Timeout: execution timeout expressed in minutes (m) or seconds (s).
- Replicas: number of required instances.
- Consumer Number: number of threads of the consumer, the software module of the block that provides input to process by taking it from the block's work queue.
- Memory: required memory.
- CPU: thousandths of a CPU required (for example: 1000 = 1 CPU).
-
Input: input properties correspond to the input variables of the component (see above).
-
Output: read-only, the manifest of the output that the block produces for every extracted file.
Output
A ZIP Splitter block produces as many items as the files contained in the input ZIP file. The block's context cycles over these items.
Each item is a JSON with this structure:
{
"base64": Base64 encoding of an extracted file,
"charset":
"path": Path of the extracted file inside the ZIP
}
In the value of path
, Unix-style forward slashes (/
) are used to separate the portions of the path.