Skip to main content

Connected Lookup Transformation in Informatica


  • Passive Transformation 

  • Used to search 

  • To get the related values

  • To compare the values

  • Used in slowly changing dimensions (SCDs)


Lookup Transformation in Informatica
Lookup Transformation in Informatica








The source EMP does not have deptname. Target DB required deptname.

Lookup DB in this case is our Source DB which has DEPT table (SCOTT schema)



Note: To increase the performance all other ports are projected directly from SQ to the TGT.


e.g. EMPNAME,SAL etc.




Example:

Source Target

1 X 3000 10 1 X 2000 10

3000 NE 2000 (NE means not equal to)

Here, the lookup is TGT. The sal changed from 2000 to 3000. This change needs to be projected to the TGT.

Relate the Source and Target tables first.

The values are compared.

The changes are then projected to the TGT. Change of information affects dimensions.

Lookup uses Data Cache and Index Cache.

It also uses its own cache.

Default LOOKUP CACHE is STATIC CACHE (Does not change any value – brings the value and relates)

Just relates the data and pass the data.

No change to the data is possible.

In Dynamic Lookup, if we want to project the changed data, we need Associated Port (A.P.).

When Dynamic option is selected, AP,IN,IC ports are highlighted.





Steps:

Define Source (EMP).

Define Target (DIM_JOIN).

Define Mapping M_LKUP_C_S (Lookup-connected-static)

Drag Source,Target to the Mapping Designer workspace.Create a Lookup Transformation T_LKP_C_S.

Click on Create.


Lookup Transformation in Informatica
Lookup Transformation in Informatica






Select Lookup table for Lookup Transformation.
Lookup Transformation in Informatica
Lookup Transformation in Informatica



Lookup table is DEPT which in this case in the Source Database itself. Select the Source tab and select DEPT and then click on OK.

Note: From version 7.0 onwards, Lookup flat file concept has been introduced.
Lookup Transformation in Informatica
Lookup Transformation in Informatica



The structure of lookup table is brought up with the lookup ports.

Deptno,dname and loc are the lookup ports. (YES).


Project the related port from the SQ to the Lookup Transformation.
Lookup Transformation in Informatica
Lookup Transformation in Informatica


Edit the lookup transformation and in the ports tab see that the input port for deptno1 is checked.
Lookup Transformation in Informatica
Lookup Transformation in Informatica





The deptno and deptno1 ports should have same data type and size.

Select the condition tab.

Add a condition.

Lookup table column deptno = transformation port deptno1.

Click on Apply and then OK>




Properties Tab
Lookup Transformation in Informatica
Lookup Transformation in Informatica



Lookup SQL Override.

Lookup Table name.

Lookup Caching enabled. If we cache the values, we can save the values for Persistent Cache and we can use Dynamic. By default, it is checked.

Lookup policy on multiple match. By default, First value is matched because we are just passing the data.

1 x 1000 (First time projected)

1 x 2000 (Second time projected)

1 x 1000 -> same as the first time projection, here first value match does not work (as it is same as the first time projected data), so we use last value match.

In static definition, USE FIRST VALUE.

Lookup Condition is disabled.

Connection Information $source or $target.

Source Type (database or flat file)

Tracing level.

Lookup Cache Directory name

Re- cache from lookup source.

Flat file Properties:

Thousand Separator.

Decimal Separator.






Project the required ports from Lookup to the target and SQ to TGT.
Lookup Transformation in Informatica
Lookup Transformation in Informatica



Repository-> Save

Create a Session.

At the session level specify three connections STC,TGT and LKP.


TARGET CONNECTION
Lookup Transformation in Informatica
Lookup Transformation in Informatica




Lookup Transformation in Informatica
Lookup Transformation in Informatica



$Source contains the Source database.

Lookup table name is DEPT.

Create a Workflow.

Save the Repository.

Start the Workflow.

Lookup Transformation in Informatica
Lookup Transformation in Informatica

Preview the output data.

Comments

  1. Assalaamu Alykum warahmatullahi wabarakatuhu.. Jazakallah khyr.

    If look table has few millions of records, how to tune the lookup to make it cache and run faster?

    ReplyDelete
    Replies
    1. Use Dynamic Lookup instead static lookup and use Ordered data input to lookup.

      Delete
  2. Lookup Transformation:
    Follow the Steps Given in Video https://youtu.be/rYPoHOX-Y_k
    to learn how to use lookup transformation.

    ReplyDelete

Post a Comment

Popular posts from this blog

Contact Me

Do You have any queries ?                   If you are having any query or wishing to get any type of help related Datawarehouse, OBIEE, OBIA, OAC then please e-email on below. I will reply to your email within 24 hrs. If I didn’t reply to you within 24 Hrs., Please be patience, I must be busy in some work. kashif7222@gmail.com

Top 130 SQL Interview Questions And Answers

1. Display the dept information from department table.   Select   *   from   dept; 2. Display the details of all employees   Select * from emp; 3. Display the name and job for all employees    Select ename ,job from emp; 4. Display name and salary for all employees.   Select ename   , sal   from emp;   5. Display employee number and total salary   for each employee. Select empno, sal+comm from emp; 6. Display employee name and annual salary for all employees.   Select empno,empname,12*sal+nvl(comm,0) annualsal from emp; 7. Display the names of all employees who are working in department number 10   Select ename from emp where deptno=10; 8. Display the names of all employees working as   clerks and drawing a salary more than 3000   Select ename from emp where job=’clerk’and sal>3000; 9. Display employee number and names for employees who earn commission   Select empno,ename from emp where comm is not null and comm>0. 10

Informatica sample project

Informatica sample project - 1 CareFirst – Blue Cross Blue Shield, Maryland (April 2009 – Current) Senior ETL Developer/Lead Model Office DWH Implementation (April 2009 – Current) CareFirst Blue Cross Blue Shield is one of the leading health care insurance provided in Atlantic region of United States covering Maryland, Delaware and Washington DC. Model Office project was built to create data warehouse for multiple subject areas including Members, Claims, and Revenue etc. The project was to provide data into EDM and to third party vendor (Verisk) to develop cubes based on data provided into EDM. I was responsible for analyzing source systems data, designing and developing ETL mappings. I was also responsible for coordinating testing with analysts and users. Responsibilities: ·          Interacted with Data Modelers and Business Analysts to understand the requirements and the impact of the ETL on the business. ·          Understood the requirement and develope