Professional Documents
Culture Documents
Informatica Scenario Based Questions - Part 5
Informatica Scenario Based Questions - Part 5
Home Data Warehouse Informatica Informatica Scenarios Informatica Cloud Oracle Unix Hadoop
Search... Search
Informatica Scenario Based Questions - Part 5
Q1. The source data contains only column 'id'. It will have sequence numbers from 1 to 1000.
Popular Posts
The source data looks like as Informatica Scenario Based Interview Questions with
Answers - Part 1
Id
1 Unix Sed Command to Delete Lines in File - 15 Examples
2
String Functions in Hive
3
4 Top Examples of Awk Command in Unix
5
6 Sed Command in Unix and Linux Examples
7
Design/Implement/Create SCD Type 2 Effective Date
8
Mapping in Informatica
....
1000 Date Functions in Hive
https://www.folkstalk.com/2011/11/informatica-scenario-based-questions.html 1/11
11/29/2018 Informatica Scenario Based Questions - Part 5
vijay bhaskar
In Fibonacci series each subsequent number is the sum of previous two numbers. Here assume Add to circles
that the first two numbers of the fibonacci series are 1 and 2.
Solution:
STEP1: Drag the source to the mapping designer and then in the Source Qualifier
Transformation properties, set the number of sorted ports to one. This will sort the source data in
ascending order. So that we will get the numbers in sequence as 1, 2, 3, ....1000
STEP2: Connect the Source Qualifier Transformation to the Expression Transformation. In the
Expression Transformation, create three variable ports and one output port. Assign the
expressions to the ports as shown below.
STEP3: Now connect the Expression Transformation to the Filter Transformation and specify the
Filter Condition as o_flag=1
Q2. The source table contains two columns "id" and "val". The source data looks like as below
id val
1 a,b,c
2 pq,m,n
3 asz,ro,liqt
Here the "val" column contains comma delimited data and has three fields in that column.
Create a workflow to split the fields in “val” column to separate rows. The output should look like
as below.
https://www.folkstalk.com/2011/11/informatica-scenario-based-questions.html 2/11
11/29/2018 Informatica Scenario Based Questions - Part 5
id val
1 a
1 b
1 c
2 pq
2 m
2 n
3 asz
3 ro
3 liqt
Solution:
STEP2: Now connect all the three Source Qualifier transformations to the Union Transformation.
Then connect the Union Transformation to the Sorter Transformation. In the sorter
transformation sort the data based on Id port in ascending order.
STEP3: Pass the output of Sorter Transformation to the Expression Transformation. The ports in
Expression Transformation are:
id (input/output port)
val (input port)
v_currend_id (variable port) = id
v_count (variable port) = IIF(v_current_id!=v_previous_id,1,v_count+1)
v_previous_id (variable port) = id
o_val (output port) = DECODE(v_count, 1,
SUBSTR(val, 1, INSTR(val,',',1,1)-1 ),
2,
SUBSTR(val, INSTR(val,',',1,1)+1, INSTR(val,',',1,2)-INSTR(val,',',1,1)-1),
3,
SUBSTR(val, INSTR(val,',',1,2)+1),
NULL
)
STEP4: Now pass the output of Expression Transformation to the Target definition. Connect id,
o_val ports of Expression Transformation to the id, val ports of Target Definition.
https://www.folkstalk.com/2011/11/informatica-scenario-based-questions.html 3/11
11/29/2018 Informatica Scenario Based Questions - Part 5
For those who are interested to solve this problem in oracle sql, Click Here. The oracle sql query
provides a dynamic solution where the "val" column can have varying number of fields in each
row.
27 comments:
Reply
source
Rama
rajesh
anu
sonu
suryanarayana
Target
Rama*********
rajesh*******
anu*********
sonu*********
suryanarayana
Reply
Replies
Reply
https://www.folkstalk.com/2011/11/informatica-scenario-based-questions.html 5/11
11/29/2018 Informatica Scenario Based Questions - Part 5
Create an output port in expression transformation and then assign the expression
rpad(string,13,'*')
If this is not what you want, then please clearly explain your problem
Reply
Thanks
yes exactly i want to put * if the string is less than the highest string length in source but how can
v know the highest one is 13 i mean if v dont know the highest size(if v hv millions in source)
Reply
One thing you can do is write the length of the maximum length of the string in a parameter file in
one session.
SELECT max(length(string)) from table_name;
Reply
I am having a problem
i am passing dept table to router and giving three conditions to three groups
deptno=10,deptno=20,deptno=30
requirement is if first group condition is satisfied i dnt want to run remaining groups or they should
fail
If you get detpno=10 in the input, then other two group conditions will definitely fail.
Reply
For example if you specify three group conditions as deptno<=10, deptno<=20, deptno<=30.
When you get deptno=15 as input, then the 2nd and 3rd groups will satisfy.
Reply
https://www.folkstalk.com/2011/11/informatica-scenario-based-questions.html 7/11
11/29/2018 Informatica Scenario Based Questions - Part 5
Thanks for ur reply i understand the router functionality but my scenario is whenever the first
group condition( say deptno=10) satisfied the remaining group conditions( if any) should fail.
Reply
source is
abc
count
and the target should load as
abc
abc
.
.
https://www.folkstalk.com/2011/11/informatica-scenario-based-questions.html 8/11
11/29/2018 Informatica Scenario Based Questions - Part 5
count times
Replies
1. If you know the max count then using normalizer you can achieve it.
2. If you don't know the max count then...
2a. Use SQL transformation. OR
2b. Use Stored Procedure transformation.
2c. Use Java transformation.
Let me know if you need detailed solutions for it. (Contact me @ karun4all@gmail.com
Reply
Thaks
Rajneesh
Reply
https://www.folkstalk.com/2011/11/informatica-scenario-based-questions.html 9/11
11/29/2018 Informatica Scenario Based Questions - Part 5
Your Scenerios and the explanation is really amazing and so helpful... The scenerios help
understand the transformations and their properities even more...
If possible please post some more scenerios as well
Much appereciated!
Cheers!
Manasvini
Reply
ID
V_FIB1 = IIF(ID<3, ID, V_FIB2)
V_FIB2 = MOVINGSUM(V_FIB1, 2)
O_Fibonacci_Num
Connect Expression transformation's output port (ID & O_Fibonacci_Num) to the Filter
transformation.
Condition: ID>10
Note: Use Filter when you want to print the Fibonacci number till the specific ID number (eg. 10)
else you can directly connect Expression transformation's output to Target.
https://www.folkstalk.com/2011/11/informatica-scenario-based-questions.html 10/11
11/29/2018 Informatica Scenario Based Questions - Part 5
Publish Preview
https://www.folkstalk.com/2011/11/informatica-scenario-based-questions.html 11/11