Lookup Transformation in Informatica (Example)
โก Smart Summary
Lookup transformation in Informatica reads a relational table, flat file, view or synonym and returns the matching values for each incoming row, working as a join in which one side is the lookup source.

What is Lookup Transformation?
Lookup transformation is a transformation used to look up a source, Source Qualifier, or target to get the relevant data. Basically, it is a kind of join operation in which one of the joining tables is the source data, and the other joining table is the lookup table. The lookup source itself can be a relational table, a view, a synonym or a flat file.
The transformation is passive while it returns a single row for each incoming row. From PowerCenter 9.x onward it can also be created to return every row that matches the condition, and in that mode it is an active transformation. The choice is made when the transformation is created and cannot be switched afterwards.
There are two ways to place it in a mapping, and the difference decides how the returned value reaches the rest of the pipeline.
| Aspect | Connected lookup | Unconnected lookup |
| Position | Sits inside the pipeline and receives values from the previous transformation | Sits outside the pipeline and is called from an expression |
| How it is called | Rows flow into its input ports | Called with the :LKP reference qualifier |
| Values returned | Several output ports can be linked downstream | One return value goes back to the calling expression |
| Typical use | Every row needs the looked-up columns | The lookup is only needed for some rows, or the same lookup is called from several places |
In previous topics, we used the Joiner transformation to join the “emp” and “dept” tables to bring department names. In this section, we will implement the same using Lookup transformation.
How to Create Lookup Transformation
Following are the steps to create Lookup transformation in Informatica.
Step 1) Create a new mapping with EMP as source and EMP_DEPTNAME as target. The Mapping Designer canvas then holds the source, its Source Qualifier and the target definition.
Step 2) Create a new transformation using the Transformation menu, then in the Create Transformation window:
- Select Lookup transformation as the transformation
- Enter transformation name “lkp_dept”
- Select create option
Step 3) This will open the lookup table window. In this window:
- Select source button
- Select DEPT table
- Select OK button
Step 4) Lookup transformation will be created with the columns of DEPT table, now select the done button. The lkp_dept object now carries DEPTNO, DNAME and LOC as lookup ports.
Step 5) Drag and drop DEPTNO column from Source Qualifier to the Lookup transformation, this will create a new column DEPTNO1 in Lookup transformation. Then link the DNAME column from Lookup transformation to the target table.
The Lookup transformation will look up and return department name based upon the DEPTNO1 value. DEPTNO1 is the input port carrying the employee department number, while DEPTNO remains the port read from the DEPT lookup table.
Step 6) Double click on the Lookup transformation. Then in the edit transformation window:
- Select condition tab
- Set the condition column to DEPTNO = DEPTNO1
- Select OK button
Step 7) Link rest of the columns from Source Qualifier to the target table.
Now, save the mapping and execute it after creating the session and workflow. This mapping will fetch the department names using Lookup transformation.
The Lookup transformation is set to look up on the DEPT table, and the joining condition is set based on department number. If more than one DEPT row could satisfy the condition, the Lookup Policy on Multiple Match property on the Properties tab decides which value is returned.
Reusable Transformation
A normal transformation is an object that belongs to a mapping and can be used inside that mapping only. However, by making a transformation reusable it can be reused inside several mappings.
For example, a Lookup transformation which fetches employee details based on employee number can be used in multiple mappings wherever employee details are required.
By using a reusable transformation, it reduces the overwork of creating the same functionality again. Every mapping holds an instance of the one stored object, so a change made to the reusable transformation reaches all of them.
How to Create Reusable Transformation
Following are the steps to create a reusable transformation.
Step 1) Open the mapping which is having the transformation, here we are making the Rank transformation reusable.
Step 2) Double click on the transformation to open the edit transformation window. Then:
- Select Transformation tab in the window
- Select the check box to make transformation reusable
- Select yes in the confirmation window
- Select OK in the transformation properties window.
This will make the transformation reusable. The confirmation window in the third item is worth reading before it is accepted: promoting a transformation to reusable is a one-way change in the Designer, and the object cannot be demoted afterwards. Where a single mapping needs its own copy, drag the reusable object onto the canvas while holding the Ctrl key to create a non-reusable instance instead.









