Developer Mapping Guide > Mappings > Mapping Components
  

Mapping Components

Mapping components determine the data flow between sources and targets.
Every mapping must contain an input object, which reads data from a mapping component or file. Every mapping must also contain an output object, which writes data to a mapping component or file.
A mapping can also contain the following components:
Data object operations
Repository objects that contain properties required to perform certain run-time operations on sources or targets. Required for some PowerExchange adapter data sources.
Transformations
Modify data before writing it to targets. Use different transformation objects to perform different functions.
Mapplets
Reusable objects containing a set of transformations that you can use in multiple mappings.
Segments
Consist of one or more objects in a mapping, mapplet, rule, or virtual stored procedure.

Data Object Operations

A data object operation is a repository object that contains properties required to perform certain run-time operations on sources or targets. Some PowerExchange adapter data sources have a complex structure that do not allow the Developer tool to import all properties that are necessary at mapping run-time.
For example, you import a PowerExchange Microsoft Dynamic CRM source, but it does not import with precision and scale. In addition, you might need to perform specific run-time operations on Microsoft Dynamics CRM, or you might want to control the maximum number of records that the Data Integration Service can read in one batch. You can configure these properties in the data object read operation.
When you import data from a PowerExchange adapter data source, the data stored in the source's complex structure might also not be compatible with transformations in the Developer tool. You can use a data object read operation to convert the data types native to the source into transformation data types that the Developer tool can use in the mapping workflow.
When you write data to a target in a PowerExchange adapter data source with a complex structure, you might need to similarly use a data object write operation to convert data from the transformation data types back to the data types native to the data source.
If you import a physical data object from a resource, you can create data object operations for the physical data object based on the same resource. The resource is the part of the data object from which you want to read data. For example, the resource for a database can be a table or a view.
After you create the physical data object and the required data object operations, you can view the physical data object in the object editor. The object editor view includes a tab where you can configure the data object operation properties. A data object can have multiple read and write operations.

Data Object Read Operation

A data object read operation is associated with a source data object. You can create a data object read operation and configure the data object read operation properties in the object editor.
When you view the data object read operation in the object editor, the object editor displays a source object and an output object. The source and output objects comprise the data object read operation. You edit the advanced and run-time properties in the output object.
The following image shows an example of a data object read operation for a Teradata data object where the source object is EMPLOYEE and the output object is Output:
The screenshot shows a data object read operation for a Teradata data object in the object editor. The data object read operation includes two objects: EMPLOYEE and Output. EMPLOYEE is the source object and Output is the output object.
After you create the data object read operation for the physical data object, you can create a Read transformation to add the physical data object as a source in the mapping workflow. When you add the physical data object to the mapping, you can specify the Read transformation and the data object read operation that you want to use.
The following image shows the wizard that appears when you add the Teradata data object to the mapping:
The screenshot shows the wizard that appears when you add the data object to the mapping. You can select Read to create a Read transformation. Then you can select the data object read operation from the drop-down menu.
The Read transformation uses the properties that you configured in the output object of the data object read operation.

Data Object Write Operation

A data object write operation is associated with a target data object. You can create a data object write operation and configure the data object write operation properties in the object editor.
When you view the data object write operation in the object editor, the object editor displays an input object and a target object. The input and target objects comprise the data object write operation. You edit the advanced and run-time properties in the input object.
The following image shows an example of a data object write operation for a Teradata data object where the input object is Input and the target object is EMPLOYEE_TGT:
The screenshot shows a data object write operation for a Teradata data object in the object editor. The data object write operation includes two objects: Input and EMPLOYEE_TGT. Input is the input object and EMPLOYEE_TGT is the target object.
After you create the data object write operation for the physical data object, you can create a Write transformation to add the physical data object as a target in the mapping workflow. When you add the physical data object to the mapping, you can specify the Write transformation and the data object write operation that you want to use.
The following image shows the wizard that appears when you add the Teradata data object to the mapping:
The screenshot shows the wizard that appears when you add the data object to the mapping. You can select Write to create a Write transformation. Then you can select the data object write operation from the drop-down menu.
The Write transformation uses the properties that you configured in the input object of the data object write operation.

Teradata Data Object Example

A Teradata data object represents metadata based on a Teradata resource.
When you configure a data object read operation for the Teradata data object and view it in the object editor, you can see a source object and an output object. The output object displays the metadata from the Teradata resource.
The following image shows a data object read operation for the Teradata data object:
The image shows a Teradata data object with a read operation. The object editor shows a source object and an output object in the object editor. The source object is connected directly to the downstream output object. The metadata from the Teradata resource is in the output object.
The source object is tpt_src and the output object is Output. The source and output objects comprise the data object read operation.
You can look at the metadata in the output object and see that the native data types in tpt_src are converted into transformation data types in the output object. For example, the native data type VARCHAR for the name port is converted to the transformation data type string.
To use the Teradata data object in a mapping, you can create a Read transformation. When you add the Read transformation to the mapping, you select the Teradata data object and the data object read operation that you previously configured.
Because the Read transformation needs to access the transformation data types stored in the output object of the data object read operation, the Read transformation is created based on the object operation, not the Teradata data object. The Read transformation uses the same properties that you configured for the data object read operation.
The following image highlights the Read transformation tpt_read in the mapping editor:
The image shows a Teradata data object with a Read transformation in the mapping editor. In this example, the Read transformation is connected directly to an associated downstream Write transformation. The metadata in the Read transformation is the same as the metadata in the output object shown in the data object editor in the previous image.
Notice that the metadata in the Read transformation and the output object of the data object read operation are the same. For example, the metadata in the name port uses the transformation data type string instead of the native data type VARCHAR.

Transformations

A transformation is an object that generates, modifies, or passes data.
Informatica Developer provides a set of transformations that perform specific functions. For example, an Aggregator transformation performs calculations on groups of data. Transformations in a mapping represent the operations that the Data Integration Service performs on the data. Data passes through transformation ports that you link in a mapping or mapplet.
Transformations can be active or passive. Transformations can be connected to the data flow, or they can be unconnected. For more information about transformations, see the Developer Transformation Guide.

Mapplets

A mapplet is a reusable object containing a set of transformations that you can use in multiple mappings.
When you use a mapplet in a mapping, you use an instance of the mapplet. Any change made to the mapplet is inherited by all instances of the mapplet. Mapplets can contain other mapplets. You can also use a mapplet more than one time in a mapping or mapplet. You can create a mapplet manually. You can also generate a mapplet from a segment within a mapping or mapplet.
For more information about mapplets, see Mapplets.

Copying a Segment

You can copy a segment when you want to reuse a portion of the mapping logic in another mapping, mapplet, rule, or virtual stored procedure.
    1. Open the object that contains the segment that you want to copy.
    2. Select a segment by highlighting each object you want to copy.
    Hold down the Ctrl key to select multiple objects. You can also select segments by dragging the pointer in a rectangle around objects in the editor.
    3. Click Edit > Copy to copy the segment to the clipboard.
    4. Open a target mapping, mapplet, rule, or virtual stored procedure.
    5. Click Edit > Paste.