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
A Text ZIP Reducer block has the following input variables:
text
(string, optional): the plain text of the file to add to the output ZIP.json
(object, optional): JSON whose string representation becomes the text of the file to add to the output ZIP file.path
(string, required) Name or path of the file to add to the output ZIP.
One between text
and json
is required and excludes the other, so if text
has a value json
must not a value and vice versa.
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: these properties correspond to the input variables and must be set to the output keys of blocks of the reference context.
-
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.