my source is like this id,name sal 10 abc 1000,10 pqr 2000,
10 xyz 3000 ,10 jkl 4000 and my requirement is like this
10 abc,pqr,xyz,jkl 2000 ....
i have try for this by using expression transformatin its ok
of the concatenation of second column but the thing is that
on third column if u group by using agg t/r the last value
will com i.e 4000 but i asked by a interviewer that i dont
want the first or last column i want the middle column i.e
2000 .plz reply for the same

Answers were Sorted based on User's Feedback



my source is like this id,name sal 10 abc 1000,10 pqr 2000, 10 xyz 3000 ,10 jkl 4000 and my require..

Answer / babu

Hi,

Below is the mapping for this scenario.
SEQ
||
SRC==>SQ==>EXP==>AGGR==>UNION==>FLT==>TGT
|| ||
EXP==============

1.EXP::SNO(NEXTVALPORT) From Sequence generator
ID <input>
NAME <input>
O_NAME=(IIF(ID=V_ID,V_NAME||' ,'||NAME,NAME)) <Oport>
V_ID=ID <Variablr Port>
V_NAME=NAME <Variable Port>
SAL <I&O>

2.1.AGGR::ID
CNO=COUNT(ID)
2.2.EXP::SNO
ID
O_NAME
SAL

3.UNION the two pipelines(AGGR & EXP 2.2)
SNO
ID
O_NAME
SAL
CNO

4.FLLTER (SNO=CNO/2)
5.TGT

Is This Answer Correct ?    1 Yes 0 No

my source is like this id,name sal 10 abc 1000,10 pqr 2000, 10 xyz 3000 ,10 jkl 4000 and my require..

Answer / babu

Sorry to all,

Above answer is have small correction theat is very
difficult to explain here.

i will give one more solution, it is very simple

Mapping:
=======
SEQ
||
SRC=>SQ=>EXP=>AGGR(NOGROUPBY)=>TG1(ID,NAME)
||
EXP=======================FLT==TG2(SAL)

SQ::SELECT A.ID,A.NAME,A.SAL,(SELECT COUNT(ID) FROM TABLE
T) CNO FROM TABLE T

EXP::SNO(NEXTVALPORT) From Sequence generator
ID <input>
NAME <input>
O_NAME=(IIF(ID=V_ID,V_NAME||' ,'||NAME,NAME)) <Oport>
V_ID=ID <Variablr Port>
V_NAME=NAME <Variable Port>
SAL <I&O>
CNO
FLT:: SNO=CNO/2 RETURN SAL

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Informatica Interview Questions

What is dimensional table? Explain the different dimensions.

0 Answers  


if i have records like these (source table) rowid name 10001 gdgfj 10002 dkdfh 10003 fjfgdhgjk 10001 gfhgdgh 10002 hjkdghkfh the target table should be like these by using expression tranformation. (Target table) rowid name 10001 gdgfj 10002 dkdfh 10003 fjfgdhgjk xx001 gfhgdgh xx002 hjkdghkfh (that means duplicated records should contain XX in there rowid)

5 Answers   iFlex,


What are Dimensional table?

0 Answers   Informatica,


What is the meaning of decode in informatica?

0 Answers  


What are the challenges of Dataware housing in the future?

2 Answers   HP,






how to work with mapplet designer in informatica?

7 Answers  


What are the types of schemas we have in data warehouse and what are the difference between them?

0 Answers  


There are n numbers of flatfile of exactly same format are placed in a folder .Can we load these flatfile's data one by one to a single relational table by a single session??

9 Answers   TCS,


In how many ways we can create ports?

0 Answers  


Change Data Capture in Informatica,using Incremental Aggregation.How can i identify the these data in Target table.

2 Answers  


How will u pas the data with out debugger?

4 Answers  


Explain informatica architecture - version 8 / 9

0 Answers   Informatica,


Categories