Skip to content

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 the base64 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: these properties correspond to the input variables.
    Input properties are read-only—so only descriptive of the expected input—when the block is the first in a flow and the workflow's input has not been explicitly described. In that case the workflow's input JSON must contain keys whose name and type match those of the input variables.
    Otherwise, they are editable and must be set.

  • Output: read-only, this property is a reminder of the structure of the output JSON that the splitter 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.