Provides a method for continuing or stopping flows depending on customized test conditions.
Information at a Glance
Category
|
Tools
|
Data source type
|
DB, HD
|
Sends 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
|
Any notes or helpful information about this operator's parameter settings. When you enter content in the
Notes field, a yellow asterisk is displayed 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.
- is empty
- has rows (the default)
|
If Test Condition Fails
|
If the
Test Condition is not met, this branch of the flow ends and, optionally, produces an error.
- Stop flow branch (the default)
- Stop flow branch with 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
- Visual Output
- A message that indicates whether the test condition was met.
-
If Stop flow branch with error is set, the error appears in the log as follows:
- Data Output
- If the Flow Condition is passed, the designated
Passthrough Dataset is passed to the next operator in the flow.
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.
Copyright © Cloud Software Group, Inc. All rights reserved.