Developer Mapping Guide > Mapping Parameters > Parameters in Mapplets
  

Parameters in Mapplets

You can bind a mapplet parameter to a parameter in a data object or in a transformation that is in the mapplet.
When you define a mapplet parameter, you can bind the mapplet parameter to a specific transformation parameter. The mapplet parameter value overrides the default parameter value in the transformation. When you bind a mapplet parameter to a transformation parameter, the parameters must be the same type. The mapplet parameter name does not have to be the same as the transformation parameter name. You can bind a mapplet parameter to more than one transformation parameter.
Use one of the following methods to define mapplet parameters:
Define mapplet parameters on the Parameters tab of the mapplet Properties view
On the mapplet Parameters tab, you can manually enter each parameter name, parameter attributes, and default value. After you define a parameter, you can view and access the parameter in the Outline view.
Add mapplet parameters from transformation parameters
After you add a transformation to a mapplet, you can create the mapplet parameter directly from the transformation Parameters tab.

Parameter Instance Values in Mapplets

When you add a reusable transformation with transformation parameters to a mapplet, you can set the instance value for each parameter. The instance value of the parameter is the parameter value in a specific mapplet.
After you add the transformation to a mapplet, set the instance value on the transformation Parameters tab.
Choose one of the following options for the Instance Value:
Expose as mapplet parameter
Create a mapplet parameter with the same attributes as the transformation parameter. Bind the mapping parameter to the transformation parameter in the same step.
Parameter
Bind a mapplet parameter to the transformation parameter. You can browse for and select a mapplet parameter to bind to the transformation parameter. You can also create a mapplet parameter and bind that parameter to the transformation parameter. When you create a mapplet parameter and bind it, you are performing the same task as the Expose As Mapplet Parameter option. However, when you manually create the mapplet parameter, you can configure a different name than the transformation parameter and you can set a different default value.
Use default
Use the default value from the transformation parameter. Skip binding a mapplet parameter to the transformation parameter.
Value
Enter a different default parameter value to use in the mapplet. Skip binding a mapplet parameter to the transformation parameter.

Mapplet Parameters in Mappings

When you add a mapplet with mapplet parameters to a mapping, you can set the instance values for the mapplet parameters. The instance value of a mapplet parameter is the parameter value for a specific mapping.
Set the instance value on the mapplet Parameters tab in the Properties view.
Choose one of the following options for the Instance Value:
Expose as mapping parameter
Create a mapping parameter with the same attributes as the mapplet parameter. Bind the mapping parameter to the mapplet parameter in the same step.
Parameter
Bind a mapping parameter to the mapplet parameter. You can browse for and select a mapping parameter to bind to the mapplet parameter. You can also create a mapping parameter and bind it to the mapplet parameter . When you create a mapping parameter and bind it, you are performing the same task as the Expose As Mapping Parameter option. However, when you manually create the mapping parameter, you can configure it with a different name and default value than the mapplet parameter.
Use default
Use the default value from the mapplet parameter. Skip binding a mapping parameter to the mapplet parameter.
Value
Enter a default parameter value to use in the mapping. Skip binding a mapping parameter to the mapplet parameter.

Parameters in Mapplets Example

You can define mapplet parameters and override them with mapping parameters.
You might define an SQL transformation that returns customer data from a Customer table. You add the SQL transformation to a mapplet and parameterize the run-time connection.
You then add the mapplet to mappings that retrieve customer data from different databases. You define a mapping parameter in each mapping to override the default connection from the mapplet parameter.
The following table lists the connection parameters that you might create for the mapplet and for the mappings:
Object Name
Object Type
Parameter Name
Parameter Default Value
mp_Get_Customer
Mapplet
mp_cust_connection
Oracle_Default
m_billing_mapping
Mapping
m_acctg_connection
Oracle_AcctDB
m_order_fill_mapping
Mapping
m_shipping_connection
Oracle_Warehouse
m_cust_main_mapping
Mapping
m_master_connection
Oracle_Cust_Mast
The mapplet, mp_Get_Customer, has a connection parameter called mp_cust_connection. The parameter has Oracle_Default as the default connection name. This connection might reference a test database, for example.
Each mapping has a connection parameter that overrides the mp_cust_connection parameter. Each mapping connects to the accounting, the warehouse, or the customer master database.
You must bind each mapping parameter to the mapplet parameter to override the default value. To change the value of the mapping parameters at runtime, you can configure a parameter set or a parameter file.