Source table
-------------
ID NAME
--- ------
101 PANKAJ
NULL KUMAR
NULL MATHUR
102 JYOTI
NULL SAXENA
103 SACHIN
NULL TENDULKAR
TARGET TABLE
-------------
ID NAME
--- -------
101 PANKAJ KUMAR MATHUR
102 JYOTI SAXENA
103 SACHIN TENDULKAR
How to do the above scenario in Informatica.
Answers were Sorted based on User's Feedback
Answer / babu
Hi Sbvprasad,
Your answer has small correction,
V1=iif(not isnull (id),id,v1)
for the 1st record.
V1= iif( not isnull (101), then pass 101).
now the V1 variable having the value = 101.
2nd record
V1= iif( not isnull ( null), then pass else condition V1 (
having 101 ))
now the V1 variable having the value = 101.
3rd record
V1= iif( not isnull ( null), then pass else condition V1 (
having 101 ))
now the V1 variable having the value = 101.
After applied the above logic we will get the output as
mentioned below.
-------------
ID NAME
--- ------
101 PANKAJ
101 KUMAR
101 MATHUR
102 JYOTI
102 SAXENA
103 SACHIN
102 TENDULKAR
2.Take an EXP t/r,in this t/r declare two variable ports
for ID and Name columns.those are PRV_ID and VAR_NAME
VAR_NAME=IIF(PRV_ID=ID,VAR_NAME||' '||NAME,NAME)
PRV_ID=ID
OP_NAME=VAR_NAME (OUTPUT PORT)
3.In the next step take the aggregator transformation and
group by on the ID COLUMN. Then you will get the result.
TARGET TABLE
-------------
ID NAME
--- -------
101 PANKAJ KUMAR MATHUR
102 JYOTI SAXENA
103 SACHIN TENDULKAR
MAPPING ::
---------
SRC-->SQ-->EXP-->EXP-->AGGR-->TRG
IF ANY THING WRONG, PLEASE CORRECT WITH PROPER SOLUTION.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / nagraj
From SQ pass to Expression Transformation
- Take Variable for ID i.e.
V_ID =iif(not isnull(ID),ID ,V_ID )
- Take Variable for Name i.e.
iif( isnull(ID) ,CONCAT(CONCAT(LTRIM(RTRIM
(V_old_Name)),' ') ,Name),Name)
At this stage you will see the Data like this
ID Name
101 PANKAJ
101 PANKAL KUMAR
101 PANKAJ KUMAR MATHUR
Now pass the ID and NAME output port through an Aggregator
Transformation
-Take new variable for Name i.e.
New_Name=concat(concat(New_Name,' '),Name)
-Take new output port for Name and put expression for the
Name output port as follows
Out_Name=GREATEST(Name,New_Name)
- Check Group By on ID
Pass the ID and Name outpurt port to the Target.
option (truncate and load)
Where Group by on ID port
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sbvprasad
V1=iif(not isnull (id),id,v1)
for the 1st record.
V1= iif( not isnull (101), then pass 101).
now the V1 variable having the value = 101.
2nd record
V1= iif( not isnull ( null), then pass else condition V1 (
having 101 ))
now the V1 variable having the value = 101.
3rd record
V1= iif( not isnull ( null), then pass else condition V1 (
having 101 ))
now the V1 variable having the value = 101.
After applied the above logic we will get the output as
mentioned below.
-------------
ID NAME
--- ------
101 PANKAJ
101 KUMAR
101 MATHUR
102 JYOTI
102 SAXENA
103 SACHIN
102 TENDULKAR
2.In the next step take the aggregator transformation and
group by on the id. Then you will get the result.
TARGET TABLE
-------------
ID NAME
--- -------
101 PANKAJ KUMAR MATHUR
102 JYOTI SAXENA
103 SACHIN TENDULKAR
| Is This Answer Correct ? | 3 Yes | 8 No |
What are the components of Informatica? And what is the purpose of each?
What is different between informatica version 8 and 9 version
If we have lookup table in workflow how do you trouble shhot to increase performance?
write asql query to filter improper date format? date 20-apr 11-mar-2010 30-may-2010 feb-2009 i want the output date 11-mar-2010 30-may-2010
How to do Half of the table ex: if 1000 records are there means 500 in one table and 500 in second table like this if N number of tables means how to do Half of the table ??????????
if i have a delimited file as source so how can we seperate this file into three diff targets?
What are the designer tools for creating transformations?
Normalizer transformation is not involved in Mapplet.. why???
If a workflow stops or fails after loading 10k records ? How can you recover it and If there is no order while reading data from source ?
Scenario is like this: Name Sal A 10; B 20; C 30; Then Output should be Name Sal A 10; B 20; C 30; Total 60; Use SQL For this scenario
Howmany ways yoU can update a relational source defintion and what are they?
How to calculate the cache size if say we are doing a performance check on a mapping and found that a particular cache needs to be changed. Is there a formula to calculate this! i know that informatica has a auto option available but how to calculate manually?