Mappings > Parameters > Input parameters
  

Input parameters

An input parameter is a placeholder for a value or values in a mapping. You define the value of the parameter when you configure the mapping task.
You can create an input parameter for logical aspects of a data flow. For example, you might use a parameter in a filter condition and a parameter for the target object. Then, you can create multiple tasks based on the mapping and write different sets of data to different targets. You could also use an input parameter for the target connection to write target data to different Salesforce accounts.
The following table describes the input parameters that you can create in each transformation:
Transformation
Input parameter use in mappings and tasks
Source
You can use an input parameter for the following parts of the Source transformation:
  • - Source connection. You can configure the connection type for the parameter or allow any connection type. In the task, you select the connection to use.
  • - Source object. In the task, you select the source object to use. For relational and Salesforce connections, you can specify a custom query for a source object.
  • - Filter. In the task, you configure the filter expression to use. To use a filter for a parameterized source, you must use a parameter for the filter.
  • - Sort. In the task, you select the fields and type of sorting to use. To sort data for a parameterized source, you must use a parameter for the sort options.
Target
You can use an input parameter for the following parts of the Target transformation:
  • - Target connection. You can configure the connection type for the parameter or allow any connection type. In the task, you select the connection to use.
  • - Target object. In the task, you select the target object to use.
  • - Completely parameterized field mapping. In the task, you configure the entire field mapping for the task.
  • - Partially parameterized field mapping. Based on how you configure the parameter, you can use the partial field mapping parameter as follows:
    • - Configure links in the mapping and display unmapped fields in the task.
    • - Configure links in the mapping and display all fields in the task. Allows you to edit links configured in the mapping.
All transformations with incoming fields
You can use an input parameter for the following parts of the Incoming Fields tab of any transformation:
  • - Field rule: Named field. You can use a parameter when you use the Named Fields field selection criteria for a field rule. In the task, you select the field to use in the field rule.
  • - Renaming fields: Pattern. You can use a parameter to rename fields in bulk with the pattern option. In the task, you enter the regular expression to use.
Aggregator
You can use an input parameter for the following parts of the Aggregator transformation:
  • - Group by: Field name. In the task, you select the incoming field to use.
  • - Aggregate expression: Additional aggregate fields. In the task, you specify the fields to use.
  • - Aggregate expression: Expression for aggregate field. In the task, you specify the expression to use for each aggregate field.
Data Masking
You can use an input parameter for masking techniques in the Data Masking transformation.
In the task, you select and configure the masking techniques.
Expression
You can use an input parameter for an expression in the Expression transformation.
In the task, you create the entire expression.
Filter
You can use an input parameter for the following parts of the Filter transformation:
  • - Completely parameterized filter condition. In the task, you enter the incoming field and value, or you enter an advanced data filter.
  • - Simple or advanced filter condition: Field name. In the task, you select the incoming field to use.
  • - Simple or advanced filter condition: Value. In the task, you select the value to use.
Joiner
You can use an input parameter for the following parts of the Joiner transformation:
  • - Join condition. In the task, you define the entire join condition.
  • - Join condition: Master field. In the task, you select the field in the master source to use.
  • - Join condition: Detail field. In the task, you select the field in the detail source to use.
Lookup
You can use an input parameter for the following parts of the Lookup transformation:
  • - Lookup connection. You can configure the connection type for the parameter or allow any connection type. In the task, you select the connection to use.
  • - Lookup object. In the task, you select the lookup object to use.
  • - Lookup condition: Lookup field. In the task, you select the field in the lookup object to use.
  • - Lookup condition: Incoming field. In the task, you select the field in the data flow to use.
Mapplet
You can use an input parameter for the following parts of the Mapplet transformation:
  • - Connection. If the mapplet uses connections, you can configure the connection type for the parameter or allow any connection type. In the task, you select the connection to use.
  • - Completely parameterized field mapping. In the task, you configure the entire field mapping for the task.
  • - Partially parameterized field mapping. Based on how you configure the parameter, you can use the partial field mapping parameter as follows:
    • - Configure links in the mapping that you want to enforce, and display unmapped fields in the task.
    • - Configure links in the mapping, and allow all fields and links to appear in the task for configuration.
You can configure input parameters separately for each input group.
Rank
You can use an input parameter for the number of rows to include in each rank group.
In the task, you enter the number of rows.
Router
You can use an input parameter for the following parts of the Router transformation:
  • - Completely parameterized group filter condition. In the task, you enter the expression for the group filter condition.
  • - Simple or advanced group filter condition: Field name. In the task, you select the incoming field to use.
  • - Simple or advanced group filter condition: Value. In the task, you select the value to use.
Sorter
You can use an input parameter for the following parts of the Sorter transformation:
  • - Sort condition: Sort field. In the task, you select the field to sort.
  • - Sort condition: Sort Order. In the task, you select either ascending or descending sort order.
SQL
You can use an input parameter for the following parts of the SQL transformation:
  • - Connection: In the Mapping Designer, select the stored procedure or function before you parameterize the connection. Use the Oracle or SQL Server connection type. In the task, you select the connection to use.
  • - User-entered query: You can use string parameters to define the query. In the task, you enter the query.
Structure Parser
You can use an input parameter for the following parts of the Structure Parser transformation:
  • - Completely parameterized field mapping. In the task, you configure the entire field mapping for the task.
  • - Partially parameterized field mapping. Based on how you configure the parameter, you can use the partial field mapping parameter as follows:
    • - Configure links in the mapping that you want to enforce, and display unmapped fields in the task.
    • - Configure links in the mapping, and allow all fields and links to appear in the task for configuration.
Transaction Control
You can use an input parameter for the following parts of the Transaction Control transformation:
  • - Transaction Control condition: In the task, you specify the expression to use as the transaction control condition.
  • - Advanced transaction control condition: Expression. In the task, you specify the string or field to use in the expression.
Union
You can use an input parameter for the following parts of the Union transformation:
  • - Completely parameterized field mapping. In the task, you configure the entire field mapping for the task.
  • - Partially parameterized field mapping. Based on how you configure the parameter, you can use the partial field mapping parameter as follows:
    • - Configure links in the mapping that you want to enforce, and display unmapped fields in the task.
    • - Configure links in the mapping, and allow all fields and links to appear in the task for configuration.
You can configure input parameters separately for each input group.

Input parameter types

You can create different types of input parameters. The type of parameter indicates how and where you can use the parameter.
For example, when you create a connection parameter, you can use it as a source, target, or lookup connection. An expression parameter can represent an entire expression in the Expression transformation or the join condition in the Joiner transformation. In a transformation, only input parameters of the appropriate type display for selection.
You can create the following types of input parameters:
string
Represents a string value to be used as entered.
In the task, the string parameter displays as a text box in most instances. A Named Fields string parameter displays a list of fields from which you can select a field.
You can use string parameters in the following locations:
connection
Represents a connection. You can specify the connection type for the parameter or allow any connection type.
In the task, the connection parameter displays a list of connections.
You can use connection parameters in the following locations:
If you want to use a connection parameter with a data object or query, configure the mapping with an actual connection. After you configure the mapping logic, replace the connection with the connection parameter. If you need to edit the object or query, in the mapping, reselect the connection. After you save your changes, replace the connection with the connection parameter again.
expression
Represents an expression.
In the task, displays the Field Expression dialog box to configure an expression.
You can use expression parameters in the following locations:
data object
Represents a data object, such as a source table or source file.
In the task, appears as a list of available objects from the selected connection.
You can use data object parameters in the following locations:
field
Represents a field.
In the task, displays as a list of available fields from the selected object.
You can use field parameters in the following locations:
field mapping
Represents field mappings for the task. You can create a full or partial field mapping.
Use a full field mapping parameter to configure all field mappings in the task. In the task, a full field mapping parameter displays all fields for configuration.
Use a partial field mapping to configure field mappings in the mapping and in the task.
You can use a partial field mapping parameter as follows:
You can use field mapping parameters in the following locations:
mask rule
Represents a masking technique.
In the task, the mask rule parameter displays a list of masking techniques. You select and configure a masking technique in each incoming field.

Input parameter configuration

You can create a parameter in the Input Parameter panel or in the location where you want to use the parameter.
The Input Parameter panel displays all input parameters in the mapping. You can view details about the input parameter and the transformation where you use the parameter.
When you create a parameter in the Input Parameter panel, you can create any type of parameter. In a transformation, you can create the type of parameter that is appropriate for the location.
If you edit or delete an input parameter, consider how transformations that use the parameter might be affected by the change. For example, if a SQL transformation uses a connection parameter, the connection type must be Oracle or SQL Server. If the connection parameter is changed so that the connector type is no longer Oracle or SQL Server, the SQL transformation can no longer use the connection parameter.
To configure a mapping with a connection parameter, configure the mapping with a specific connection. Then, you can select the source, target, or lookup object that you want to use and configure the mapping. After the mapping is complete, you can replace the connection with a parameter without causing changes to other mapping details.
When you use an input parameter for a source, lookup, or target object, you cannot define the fields for the object in the mapping. Parameterize any conditions and field mappings in the data flow that would use fields from the parameterized object.
When you create an input parameter, you can use the parameter properties to provide guidance on how to configure the parameter in the task. The parameter description displays in the task as a tooltip, so you can add important information about the parameter value in the description.
The following table describes input parameter properties and how they display in a mapping task:
Input parameter property
Description
Name
Parameter name. Displays as the parameter name if you do not configure a display label.
If you configure a display label, Name does not display in the task.
Display Label
Display label. Displays as the parameter name in the task.
Description
Description of the parameter. Displays as a tooltip for the parameter in the task.
Use to provide additional information or instruction for parameter configuration.
Type
Parameter type. Determines where you can use the parameter. Also determines how the parameter displays in a mapping task:
  • - String. Displays a textbox. For the Named Fields selection criteria, displays a list of fields.
  • - Connection. Displays a list of connections.
  • - Expression. Displays a Field Expression dialog box so you can create an expression.
  • - Data object. Displays a list of available objects from the configured connection.
  • - Field. Displays a list of fields from the selected object.
  • - Field mapping. Displays field mapping tables allowing you to map fields from the data flow to the target object.
Connection Type
Determines the type of connection to use in the task. Applicable when the parameter type is Connection.
For example, you select Oracle. Only Oracle connections are available in the task.
Allow parameter to be overridden at run time
Determines whether parameter values can be changed with a parameter file when the task runs. You define the parameter value to use in the task in the parameter file.
When you configure the task, you specify a default value for the parameter.
Applicable for data objects and connections with certain connection types. To see if a connector supports runtime override of source and target connections and objects, see the help for the appropriate connector.
Note: If a mapping uses a source or target object parameter that can be overridden at runtime, and an existing object is selected in the task, the parameter value in the parameter file can't be null. If the value is null, the task fails
Default Value
Default value. Displays as the default value for the parameter, when available.
For example, if you enter a connection name for a default value and the connection name does not exist in the organization, no default value displays.
Allow partial mapping override
Determines whether field mappings specified during mapping configuration can be changed in the task.
Applicable when parameter type is Field mapping.
Do not select Allow Partial Mapping Override if you want to enforce the links you configure in the mapping.

Partial parameterization with input parameters

To allow users to select one of the fields based on an input parameter at run time, you can implement partial parameterization in a mapping. Use partial parameterization to create templates for incremental data loads and other solutions.
For example, if you completely parameterize the source filter, you must include a query similar to the following example:
lastmodified_date > $$myvar
To partially parameterize the filter, you can specify the field as a variable, as shown in this example:
$field$ > $$myvar
In this case, the user can select the required field in the mapping task.
To implement partial parameterization, you must use a database connection and a Source transformation advanced filter or a Filter, Expression, Router, or Aggregator transformation. You can create an input parameter for one of the fields so that the user can select a specific field in the mapping task instead of writing a complete query. "String" and "field" are the only valid types.
Note: You can use the same parameter in all the supported transformations.
In the following example, the filter condition uses a parameter for the field name:
The example shows an advanced filter condition, "city = $PARAM_FIELD$," in which the field name is parameterized.

Rules and guidelines for partial parameterization

When you configure partial parameterization, note the following rules and guidelines:

Using parameters in a mapping

When you use parameters in a mapping, you can change the parameter values each time you run the mapping task. You specify the parameter values in the mapping task or in a parameter file.
Use the following guidelines when you use parameters in a mapping:
When you create a mapping that includes source parameters, add the parameters after you configure the mapping.
For example, you have multiple customer account tables in different databases, and you want to run a monthly report to see customers for a specific state. When you create the mapping, you want to use parameters for the source connection, source object, and state. You update the parameter values to use at runtime when you configure the task.
To configure the mapping, you perform the following steps:
  1. 1In the mapping, select the Source transformation.
  2. 2On the Source tab, select a connection that contains one of the objects that you want to use, and then select the source object.
  3. You replace the source connection and object with parameters after the mapping is configured. You cannot select a source object if the source connection is a parameter. Add a source object so that you can configure the downstream data.
  4. 3Add a Filter transformation.
  5. 4On the Filter tab, add a filter condition. Select State for the field name, and create a new string parameter for the value. You resolve the parameter when you configure the task.
  6. 5Configure the Target transformation.
  7. 6Select the Source transformation.
  8. 7On the Source tab, replace the source connection and the source object with parameters.
When you create a mapping with a parameterized target that you want to create at runtime, set the target field mapping to automatic.
If you create a mapping with a parameterized target object and you want to create the target at runtime, you must set the target field mapping to Automatic on the Target transformation Field Mapping tab. Automatic field mapping automatically links fields with the same name. You cannot map fields manually when you parameterize a target object.
Use caution when you use the same input parameter across transformations in mappings in advanced mode and SQL ELT mode.
When you use the same input parameter in multiple transformations in a mapping in advanced mode or SQL ELT mode, you might encounter unexpected behavior in the mapping task.
For example, a mapping contains an Expression transformation followed by an Aggregator transformation, and the expressions in both transformations use the same expression parameter. When you configure the parameter in the mapping task, the Built-in functions list does not display aggregate functions since the Aggregator transformation is downstream of the Expression transformation. To avoid this type of unexpected behavior, in mappings in advanced mode and SQL ELT mode, use different input parameters in each transformation.