Table of Contents

Search

  1. Preface
  2. Using the Designer
  3. Working with Sources
  4. Working with Flat Files
  5. Working with Targets
  6. Mappings
  7. Mapplets
  8. Mapping Parameters and Variables
  9. Working with User-Defined Functions
  10. Using the Debugger
  11. Viewing Data Lineage
  12. Comparing Objects
  13. Managing Business Components
  14. Creating Cubes and Dimensions
  15. Using the Mapping Wizards
  16. Datatype Reference
  17. Configure the Web Browser

Designer Guide

Designer Guide

Step 1. Create a Mapping Variable

Step 1. Create a Mapping Variable

You can create a mapping variable for any mapping or mapplet. You can create as many variables as you need. Once created, use the variable in the mapping or mapplet.
To create a mapping variable:
  1. In the Mapping Designer, click Mappings > Parameters and Variables. Or, in the Mapplet Designer, click Mapplet > Parameters and Variables.
  2. Click the Add button.
  3. Specify the variable information.
    The following table describes the options on the Declare Parameters and Variables dialog box:
    Field
    Required/
    Optional
    Description
    Name
    Required
    Variable name. Name variables $$
    VariableName
    . The syntax for the variable name must be $$ followed by any alphanumeric or underscore characters.
    Type
    Required
    Variable or parameter. Select Variable.
    Datatype
    Required
    Datatype of the variable. Select a valid transformation datatype. Use any datatype except Binary. The datatype you select can affect the Aggregation type you can select. For example, when you create a String variable, you cannot configure it with a Count aggregation type.
    Precision or Scale
    Required
    Precision and scale of the variable.
    Aggregation
    Required
    Aggregation type of the variable. Determines the type of calculation you can perform with the variable.
    • Set the aggregation to Count if you want to use the mapping variable to count number of rows read from source.
    • Set the aggregation to Max if you want to use the mapping variable to determine a maximum value from a group of values.
    • Set the aggregation to Min if you want to use the mapping variable to determine a minimum value from a group of values.
    IsExprVar
    Required
    Determines how the Integration Service expands the variable in an expression string. If true, the Integration Service expands the variable before parsing the expression. If false, the Integration Service expands the variable after parsing the expression. Default is false.
    If you set this field to true, you must set the variable datatype to String, or the Integration Service fails the session.
    Initial Value
    Optional
    Initial value of the variable. The Integration Service uses this value for the variable when the variable value is not saved in the repository or defined in the parameter file. If this value is also undefined, the Integration Service uses a default value based on the datatype of the mapping variable.
    Use any of the following formats for initial values for datetime variables:
    • MM/DD/RR
    • MM/DD/RR HH24:MI:SS
    • MM/DD/YYYY
    • MM/DD/YYYY HH24:MI:SS.US
    Description
    Optional
    Description associated with the variable.
  4. Click OK.

0 COMMENTS

We’d like to hear from you!