Skip to content

Text ZIP Reducer

Overview

Text ZIP Reducer is a reducer that produces a JSON containing the Base64 encoding and the path of a ZIP file that contains text files taken from the output of the blocks of the reference context.
In other words, a Text ZIP Reducer block, put after a context, creates text files out of context output and puts those files in a ZIP archive.

Input

Like any reducer, a Text ZIP Reducer block has a virtual input made of the multiple outputs—one per iteration—of the blocks in the reference context. The parts of this input that represent the body and the name of the files to insert in the output ZIP file are specified with a map defined in the Input tab of the block properties pop-up.

Block properties

The properties of a Text ZIP reducer 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)
  • Functional:

    • Context to reduce: reference context. It is chosen from a drop-down. To remove the choice, select Clear .
    • ZIP File name: the name of the ZIP file to generate.
  • 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:

    • text: a string key of the output of some context's block whose value becomes the contents of a text file. This property is alternative to json.
    • json: alternative to text. An object key of the output of some context's block whose value—JSON—becomes the contents of a text file.
    • path: a string key of the output of some context's block whose value becomes the name of a text file

    To set all the properties above, use the drop-down to choose the corresponding key from the list of the output keys of the context blocks.

    The list is divided in groups, one group for each context block. Select the expand and collapse icons to the right of the block name or select the name of the block multiple times to show or hide the sub-list of output keys for that block.
    In the case of the json property, the first entry in the sub-list is the block name.

    By choosing it, you indicate that the contents of the text file will coincide with the entire output JSON of that block.

    Note

    The drop-down list shows all the first-level keys that can, potentially, be available, but the keys that are actually there when executing the workflow may be less.

    You can filter the list by typing at the top of it: the list will show only keys with matching names.

    To cancel the mapping process, select No mapping from the list or, if you already chose a key, select Clear .

  • Output: read-only, a memorandum of the contents of the output JSON object, that is:

    • The Base64 encoding of the ZIP file.
    • The name of the ZIP file.