Change the Lookup Source
You can change the data object that is the lookup source for a reusable Lookup transformation. You can configure a parameter that determines the data object to use as the lookup source at run time.
When you create a transformation from a physical data object, information about the data object appears on the Data Object tab of the transformation properties. You can click the data object name to view the physical data object definition from the Model repository.
You can change the data object for the transformation by browsing for a different physical data object in the Model repository. When you change the data object, the transformation uses the run time properties and the advanced properties of the data object that you select.
You can update the structure of the data object at run time based on changes in the data source. The data source is the physical file or the database table that the data object represents. When you enable the Data Integration Service to get data columns from the data source, the Data Integration Service examines the structure of the data source. The Data Integration Service updates the data object ports in the transformation instance based on the data source. The Data Integration Service does not change the physical data object definition in the Model repository.
The following image shows the Data Object tab:
The Data Object tab has the following fields:
- Specify by
- Choose Value to enter a specific data object name. Choose Parameter to parameterize the data object.
- Data object
- The name of the data object in the Model repository. You can click the Data Object link to open the data object definition from the repository. You can also Browse for a different data object in the Model repository.
- Description
- The description of the data object in the repository. Read-only.
- Data object type
- Describes the type of data object, such as a flat file data object, a relational table object, or a customized data object.
- At run time, get data object columns from the data source
- The Data Integration Service fetches metadata and data definition changes from the data file or the table that the data object refers to and updates the structure of the data object for the transformation instance at run time.
- To preview how the Data Integration Service fetches metadata and data definition changes at run time, view the mapping with resolved parameters.
Parameterize the Lookup Source
You can configure a parameter for the Lookup source in a nonreusable Lookup transformation.
To parameterize a data object, choose Specify by Parameter in the Data Object tab. The properties in the Data Object tab change.
To parameterize the data object, create a resource type parameter or browse for a resource parameter that you already created. The parameter default value is the name of physical data object in the Model repository. When you create a default parameter value, you select a physical data object name from a list of data objects in the repository.
The following image shows the Data Object tab when you specify the data object by a parameter:
The Data Object tab has the following options by parameter:
- Parameter
- The name of a resource parameter that you configured as the data object. Read-only.
- Description
- The description of the parameter. Read-only.
- New
- Create a resource parameter. Browse for and select a data object in the Model repository for the parameter default value.
- Browse
- Browse for a resource parameter and select the parameter.
- Default value
- The default value of the resource parameter that you configured for the data object. The default value is a physical data object name and the path to the object in the Model repository. Read-only.
Port Name Conflicts with the Lookup Port
When you parameterize a lookup source, a Lookup transformation input port might have a name conflict with a port in the lookup source.
When a Lookup transformation input port has a name conflict with the lookup port in the lookup source, the Developer tool does not rename either of the ports. The Developer tool displays a validation error. You must change the input port name in the Lookup transformation or remove the port from the transformation.
Lookup Sources that Contain Parameters
You can create a lookup source from a physical data object that contains parameters. When you add the physical data object to a mapping, the parameters appear on the Data Object Parameters tab.
The following image shows the Data Object Parameters tab in the Lookup transformation:
The image shows the Customer_Order_Parm. Customer_Order_Parm is a parameter for the source file name in a flat file data object. To override the source file name in the mapping, bind the Customer_Order_Parm to a parameter in the mapping. Click Expose as Mapping Parameter to create a duplicate parameter in the mapping.
Configure Parameters in a Duplicate Data Object
You can create a duplicate data object in the repository and parameterize the properties for that physical data object. Define default values for the properties such as the connection, the resource name, the table owner, or the control file name.
You can create a duplicate data object for relational data objects and flat file data objects. You can create a duplicate data object in a reusable Lookup transformation and in a nonreusable Lookup transformation.
Create a duplicate data object in the Lookup transformation Data Object tab. You can create a duplicate object if you specify the data object as a value. When you create the duplicate data object, you replace the data object name in the Lookup transformation with the duplicate data object name. The Developer tool creates parameters for the data object properties. The Developer tool prompts you to enter default values for the parameters. The duplicate data object name syntax is: <Original object name>_Param.
The following image shows the Parameterize Using New Data Object button on theData Object tab for relational and flat file data objects:
When you parameterize a data object by creating a duplicate data object, the Developer tool creates set of parameters for the data object. The Developer tool creates different parameters based on whether the data object is a flat file or a relational data object.
When you create the duplicate data object, configure the default parameter values on the New Parameterized Data Object dialog box.
The following image shows the New Parameterized Data Object for a relational data object:
You can change the name of the data object. Enter the parameter default values for the owner and the resource parameters.
If the original data object is parameterized, the Developer tool copies the parameters from the original data object to the duplicate data object. If an original property is not parameterized, the Developer tool creates a parameter for it in the duplicate data object. The Developer tool uses the original property value as the default parameter value in the duplicate data object. When the Developer tool cannot determine an original property value, the Developer tool creates a parameter with a default value based on the parameter type.
The following image show the New Parameterized Data Object dialog box for a flat file data object:
Configure default parameter values for the source file and the source file directory. If the flat file has a control file, configure the control file name and directory.
After you configure the default values, the Developer tool creates the duplicate data object. The duplicate data object name appears on the Data Object tab of the Lookup transformation. The duplicate data object appears in the Object Navigator.
To change the parameter values for the data object after you create it, open the physical data object in the Object Navigator. Click the Parameters tab.