Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


If the source has duplicate records as id and name columns,
values:
1 a, 1 b, 1 c,
2 a, 2 b,
the target should be loaded as 1 a+b+c or 1 a||b||c, what
transformations should be used for this?

Answers were Sorted based on User's Feedback



If the source has duplicate records as id and name columns, values: 1 a, 1 b, 1 c, 2 a, 2 b, t..

Answer / shankar

SQ--->SORTER---->EXP---->AGR---->TGT

1.First pass all records into sorter
seect sort key on id.
2. An pass records into EXP
In exp creat 4 pors like
v_id=id
v_name=nme
v_name1=iif(id=v_id,name||'+'||v_name,name)
o_name=v_name1
3.Next pass all to agr
ini agr creat one port like
o_name_t=last(o_nme).
4.Pass to Target

Is This Answer Correct ?    8 Yes 0 No

If the source has duplicate records as id and name columns, values: 1 a, 1 b, 1 c, 2 a, 2 b, t..

Answer / babu

Sorry Shankar,

small mistake in your logic,

Exp Trans:
ID (I/O)
NAME (I)
V_NAME=IIF(ID=V_ID,V_NAME||'+'||NAME,NAME) (V)
V_ID=ID (V)
O_NAME=V_NAME (O)

=============
remaining is same.

Is This Answer Correct ?    2 Yes 0 No

If the source has duplicate records as id and name columns, values: 1 a, 1 b, 1 c, 2 a, 2 b, t..

Answer / mithilesh kumar rai

First Use Expression and then Use Aggregater
After Expression U will receive
1 a
1 a b
1 a b c
2 a
2 a b
2 a b c

then use aggregater group by key 'ID'
After Aggregater u will receive
1 abc
2 abc

Is This Answer Correct ?    2 Yes 2 No

If the source has duplicate records as id and name columns, values: 1 a, 1 b, 1 c, 2 a, 2 b, t..

Answer / souvik

We need to have a Lookup with a Dynamic Cache, a Router, an Expression and then an Update Strategy..... The Lookup will be on the Target Table..... So when the ID is coming for the first time, it wont found any data on the lookup table.... This can be directed for Insertion to the Target Table via a Router.... Then when the same ID is coming for the second time, it will Lookup on the Target Table and will found that the row with the ID exists.... Hence both the columns from the source table and both the columns from the Lookup are taken forward into the Router and then to an Expression Transformation where the second port is Concatenated. Then the ID port and this port is taken to the Update Strategy transformation for Update...

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More Informatica Interview Questions

I have one source table and three target tables. When the session runs for the first time involving the mapping,i want that the loading should take place in 1st Target table only. The 2nd time the same session runs the loading should take place in 2nd Target only only and similarly when the session runs for the 3rd time loading should take place in Third only. And again when the session runs for the 4th time loading should take place in 1st Target table.

4 Answers   Cap Gemini, IBM,


Separate from an archive server and a powerhouse?

0 Answers  


What is meant by incremental aggregation?

0 Answers  


What are the restrictions of union transformation?

0 Answers  


Can anyone tell me the new features in Informatica 9 Version?

2 Answers   Syntel,


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 is the target load order?

3 Answers   HCL, Informatica,


How to convert multiple rows to single row (multiple columns) in informatica

0 Answers   Informatica,


If the source has duplicate records as id and name columns, values: 1 a, 1 b, 1 c, 2 a, 2 b, the target should be loaded as 1 a+b+c or 1 a||b||c, what transformations should be used for this?

4 Answers   ABC, Cap Gemini,


my table contain duplicate Records i wanna load uniq records to my table . i have to pass the uniq records through filter t/r how?

3 Answers   ACS,


How to retrieve last two days updated records?

4 Answers  


can any one explain me what i have to tell about insurance project in interview,,,,when he asked to tell about ur project

0 Answers  


Categories