-
Notifications
You must be signed in to change notification settings - Fork 8
Expression
Nitin Motgi edited this page Aug 19, 2017
·
2 revisions
Conditions are specified as a boolean expression. A Boolean expression is a logical statement that is either TRUE or FALSE. Expressions can compare data of any type as long as both parts of the expression have the same basic data type or compatible data type. You can test data to see if it is equal to, greater than, or less than other data. Following are some of the example of an expression that can be specified.
- 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
token['Data Quality']['error'] <= runtime['max_error']
(token['File']['output'] > runtime['count']) and (runtime['a'] > runtime['b'])
(token['File']['output'] > runtime['count']) || (runtime['a'] > runtime['b'])
token['File']['output'] < runtime['count'] && token['File']['error'] < 1
- Checks if a
runtime
argumentvalue
is provided and it's notnull
and pluginFile
error
count is less than 1.
!isnull(runtime['value']) && token['File']['error'] < 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.
math:max(toDouble(token['File1']['output']), toDouble(token['File2']['output'])) > runtime[$variable]
Conditional Plugin - A boolean expression to control flow in pipeline.