Skip to content

Simple Reducer

Overview

Simple Reducer is a reducer that produces a JSON containing an array whose items have keys taken from the outputs of the blocks of the reference context.

Input

The input variables are completely custom and defined as block properties.

Input variables are valued as many times as there are iterations of the reference context and they double as the keys of each item of the output array.

Block properties

The properties of a Simple 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:

    • Field name for the array: name of the output array.
    • Context to reduce: reference context. It is chosen from a drop-down. To remove the choice, select Clear .
  • 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: the properties in this group correspond to custom input variables that must be mapped to the output keys of blocks in the reference context. Input variables are given a value for each iteration of the reference context and become the keys of each item of the output array.
    Read the article dedicated to the topic to learn how to define input variables and set input properties.

  • Output: read-only, the output manifest of the component.

Output

A Simple Reducer block produces a JSON object containing an array whose name is the value of the functional parameter Field name for the array (see in the block properties described above).

Each item of the array is an anonymous object with the keys defined in the Input tab of the block properties pop-up. The structure of the array and its items can be seen in the Output tab of the same pop-up (see above).