Table of Contents

Search

  1. Preface
  2. Mappings
  3. Mapping tutorial
  4. Parameters
  5. CLAIRE recommendations
  6. Data catalog discovery

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 when the mapping runs on the Data Integration Server.
Max or Min
All transformation data types.
SetMaxVariable
Sets the parameter to the maximum value of a group of values.
In advanced mode, this function is only available for the Expression transformation.
Max
All transformation data types
except string and text data types are available in advanced mode
.
SetMinVariable
Sets the parameter to the minimum value of a group of values.
In advanced mode, this function is only available for the Expression transformation.
Min
All transformation data types
except string and text data types are available in advanced mode
.
SetCountVariable
Increments the parameter value by one.
In advanced mode, 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.

0 COMMENTS

We’d like to hear from you!