Conditional
Plugin version: 1.12.0
A control flow plugin that allows conditional execution within pipelines. The conditions are specified as expressions and the variables could include values specified as runtime arguments of the pipeline, token from plugins prior to the condition and global that includes global information about pipeline like stage, pipeline, logical start time and plugin.
Condition plugin specifies a boolean expression to be evaluated. During pipeline execution, the condition expression specified is evaluated resulting in boolean value (either true or false). Depending on the result of evaluation, either the downstream pipeline connected along true path is executed or along the false path is executed. At at point in time, only one path is executed.
More information can be found here
Examples:
Checks if the
runtime
argumentfilepath
containsinput
.runtime['filepath'] =~ ".*input_.*"
Checks two
runtime
argumentsa
andb
.runtime['a'] > runtime['b']
Checks
output
record count ofFile
plugin fromtoken
withruntime
valuecount
.token['File']['output'] > runtime['count']
Checks
error
record count ofData Quality plugin
fromtoken
withruntime
valuemax_error
Checks if a
runtime
argumentvalue
is provided and it’s notnull
and pluginFile
error
count is less than 1.Takes the
max
of pluginFile1
output
count andFile
output
count and checks if it’s greater thanruntime
argument that is specified as a macro.
Created in 2020 by Google Inc.