Skip to content

If

The If component can evaluate an expression involving variables and direct the flow of an orchestration pipeline depending upon whether the expression evaluates to "true" or "false".

The If component has three output connectors. The blue (top) connector is followed when the expression evaluates to "true". The orange (center) connector is followed when the expression evaluates to "false". The red (bottom) connector is followed if a runtime error occurs during evaluation.

Variables involved in the expression must be declared in advance as pipeline variables or project variables. Read Variables for more information.


Properties

Name = string

A human-readable name for the component.


Mode = drop-down

Select:

  • Simple: uses the Condition and Combine Conditions properties to define an expression.
  • Advanced: provides a code editor to write your own JavaScript expression.

Condition (Advanced mode) = code editor

A JavaScript expression, which will be evaluated to determine whether it is true or false. If the expression is not itself a true or false value, then any non-empty string is considered true, as is any non-zero number.

Only used if Mode is Advanced.


Condition (Simple mode) = column editor

Click + to add a condition. Any number of conditions can be added; the Combine Conditions property will define how they work together.

For each condition, enter the following:

  • Input Variable: The variable to use in the comparison. If the input variable is null, it will be considered blank.
  • Qualifier:Select Is or Not. Not reverses the meaning of the comparator; for example, changing an "Equals" to a "Does Not Equal" expression.
  • Comparator: Select the comparison operator.
  • Value: Most commonly a constant value, but can also be a variable reference or expression. The value is parsed according to the type of the input variable.

Only used if Mode is Simple.


Combine Conditions = drop-down

Use the defined conditions in combination with one another according to either "And" or "Or". Only used if Mode is Simple.


Snowflake Databricks Amazon Redshift (preview)