Adding a Scatter Operator
Given a record with array fields (must have the same length), the scatter operator will emit one record for each position in the array(s). This operator is similar with unpivot but on array positions instead of columns.
If the input record has an integer array field A of length N and text (non-array) field T, the operator will output N records with integer (non-array) field A and text (non-array) field T. For example, they will have values: { A[0], T }, { A[1], T }, …, { A[N-1], T } (assuming zero-based indexing).
If the input has no array fields, the scatter operator is a no-op and will pass records through unchanged.
- On the Application page, click
and select Scatter
in the Add Operator pane.
The Scatter node
icon displays in the Graph pane, as well as the properties to be defined in the Operator Settings pane, and the preview of the data in the Schema pane.
The right (outbound) edge allows you to connect to the other operators.
- In the Operator Settings pane, define or select the following required properties:
Property Description Node ID
The ID of the scatter operator.
Inputs
The stream of records or input you will be subscribed to.
NOTE: Node ID and Inputs properties are required.
The preview of the data (OUTPUT) is displayed in the Schema panel.
- Save the changes.
Example
(c) 2013-2024 Altair Engineering Inc. All Rights Reserved.