Flow Control
Provides a method for continuing or stopping flows depending on customized test conditions.
Information at a Glance
|
Parameter |
Description |
|---|---|
| Category | Tools |
| Data source type | DB, HD |
| Send output to other operators | Yes |
| Data processing tool | Pig |
A typical use case for the Flow Control operator might be a test condition that checks for new data, with the flow being processed if new data is detected, and halted otherwise.
Input
One or two data sets from the preceding operator.
Configuration
| Parameter | Description |
|---|---|
| Notes | Notes or helpful information about this operator's parameter settings. When you enter content in the Notes field, a yellow asterisk appears on the operator. |
| Test Dataset | Used to determine the test condition for processing or not processing the flow. This can either be the same data set as the passthrough data set, or a different test condition data source (such as the results from a Row Filter). |
| Test Condition | If the
Test Dataset matches the
Test Condition, the flow continues. Otherwise, the
If Test Condition Fails parameter determines the resulting flow behavior.
|
| If Test Condition Fails | If the
Test Condition is not met, this branch of the flow ends and, optionally, produces an error.
|
| Passthrough Dataset | If the
Test Condition passes, the passthrough data set is passed along to the rest of the workflow.
If only one data set is connected to this operator, the test data set and the passthrough data set are the same. |
Output
If Stop flow branch with error is set, the error appears in the log as follows:
Example
The following example flow employs the Row Filter operator to first test the data source for negative values. If the prescribed Test Condition exists, the Flow Control operator stops the flow from processing and produces an error in the log.