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

The input to a ZIP Splitter block must be a JSON with this structure:

{
  "base64": Base64 encoding of a ZIP file,
  "path": Filename or path of the ZIP file
}

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: read-only, these properties are a reminder of the structure of the input JSON.

  • Output: read-only, this property is 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,
  "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.