Saturday, February 2, 2013

Informatica Interview Questions on Expression Transformation



1. What is an expression transformation?

An expression transformation is used to calculate values in a single row.
Example: salary+1000

2. How to generate sequence numbers using expression transformation?
Create a variable port in expression transformation and increment it by one for every row. Assign this variable port to an output port.

3. Consider the following employees data as source?

Employee_id, Salary
-------------------
10,          1000
20,          2000
30,          3000
40,          5000

Q1. Design a mapping to load the cumulative sum of salaries of employees into target table?
The target table data should look like as

Employee_id, Salary, Cumulative_sum
-----------------------------------
10,          1000,      1000
20,          2000,      3000
30,          3000,      6000
40,          5000,      11000

Q2. Design a mapping to get the pervious row salary for the current row. If there is no pervious row exists for the current row, then the pervious row salary should be displayed as null.
The output should look like as

Employee_id, Salary, Pre_row_salary
-----------------------------------
10,          1000,      Null
20,          2000,      1000
30,          3000,      2000
40,          5000,      3000

4. Consider the following employees table as source

Department_no, Employee_name
----------------------------
20,               R
10,               A
10,               D
20,               P
10,               B
10,               C
20,               Q
20,               S

Q1. Design a mapping to load a target table with the following values from the above source?

Department_no, Employee_list
----------------------------
10,            A
10,            A,B
10,            A,B,C
10,            A,B,C,D
20,            A,B,C,D,P
20,            A,B,C,D,P,Q
20,            A,B,C,D,P,Q,R
20,            A,B,C,D,P,Q,R,S

Q2. Design a mapping to load a target table with the following values from the above source?

Department_no, Employee_list
----------------------------
10,            A
10,            A,B
10,            A,B,C
10,            A,B,C,D
20,            P
20,            P,Q
20,            P,Q,R
20,            P,Q,R,S


3 comments:

  1. Excellent piece of knowledge, I have readied at least eight posts of your website and let me tell you, your website provides the most fascinating information. This is the knowledge that I had been craving for, thanks for sharing such a wonderful information https://goo.gl/TgZNht

    ReplyDelete
  2. Hello Sir,

    I started learning Informatica and your page is really excellent.. Very knowledgeable and helpfull... Need one more help.. If you could could please update the answers to all the interview questions with the business logic.. That will really help in practising.

    ReplyDelete
  3. Hello Sir,

    I started learning Informatica and your page is really excellent.. Very knowledgeable and helpfull... Need one more help.. If you could could please update the answers to all the interview questions with the business logic.. That will really help in practising.

    ReplyDelete

Thank you :
- kareem