Table of Contents

Search

  1. Preface
  2. Mappings
  3. Parameters
  4. CLAIRE recommendations
  5. Data catalog discovery
  6. Visio templates

Mappings

Mappings

Variable functions

Variable functions

Variable functions determine how a task calculates the current value of an in-out parameter at run time.
You can use variable functions in an expression to set the current parameter value when a task runs.
To keep the parameter value consistent throughout the task run, use a valid aggregation type in the parameter definition. For example, you can use the SetMaxVariable function with the Max aggregation type but not the Min aggregation type.
The following table describes the available variable functions, aggregation types, and data types that you use with each function:
Variable function
Description
Valid aggregation type
Valid data type
SetVariable
Sets the parameter to the configured value. At the end of a task run, it compares the final current value to the start value. Based on the aggregation type, it saves a final value in the job details.
This function is only available for non-elastic mappings.
Max or Min
All transformation data types except string and text data types are available for elastic mappings.
SetMaxVariable
Sets the parameter to the maximum value of a group of values.
In an elastic mapping, this function is only available for the Expression transformation.
Max
All transformation data types except string and text data types are available for elastic mappings.
SetMinVariable
Sets the parameter to the minimum value of a group of values.
In an elastic mapping, this function is only available for the Expression transformation.
Min
All transformation data types except string and text data types are available for elastic mappings.
SetCountVariable
Increments the parameter value by one.
In an elastic mapping, this function is only available for the Expression transformation. Configure the SetCountVariable function immediately before the target transformation to avoid a non-deterministic COUNT return value. For example, if you configure the SetCountVariable function before a transformation that contains multiple downstream pipelines, the generated COUNT value might be n times the actual row count.
Count
Integer and bigint
Use variable functions one time for each in-out parameter in a pipeline. During run time, the task evaluates each function as it encounters the function in the mapping. As a result, the task might evaluate functions in a different order each time the task runs. This might cause inconsistent results if you use the same variable function multiple times in a mapping.