Creating a mapping and using transformation features
In the earlier section, we learned about all the prerequisites for creating mapping. Mapping is a structural flow of data from the source to the target through transformations.
To understand the basic steps of creating mapping, let's start by creating a pass-through mapping. A pass-through mapping inserts all the source rows into the target without any modification. A pass-through mapping is a simple flow from source to target without any changes in data.
We will use the EMPLOYEE Oracle table as the source and the TGT_EMPLOYEE as the target for creating a pass-through mapping.
In the following steps, you create a mapping and link columns in the source EMPLOYEES table to a Source Qualifier transformation.
- Go to Tools | Mapping Designer | Mappings | Create... to create a new mapping:
- In the Mapping Name dialog box, enter m_PASS_THROUGH_EMPLOYEES, and click on OK.
- Drag the EMPLOYEES source definition into the Mapping Designer workspace.
- The source definition appears in the workspace. The Designer creates a Source Qualifier transformation and connects it to the source definition. Source Qualifier is a default transformation that comes automatically with a source. We will see the usage of the Source Qualifier transformation in the next section.
- Expand the Target node in the Navigator to open the list of all the target definitions. Drag the TGT_EMPLOYEES target definition into the workspace. The target definition appears in the Mapping Designer as shown in the following screenshot:
- The final step is to connect the Source Qualifier transformation to the target definition.
- Drag the columns from Source Qualifier Transformation to Target as shown in the following screenshot. Make sure you are linking the ports properly as any mismatch in linking the ports will make the data movement incorrect.
- If you connect the links incorrectly by mistake, you can delete the links by clicking on the link and pressing the Delete button on your keyboard.
- Go to Repository | Save to save the contents in repository:
With this, the mapping is complete and saved in Repository. You can check the details in the Output panel.