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...

I have a file with data comming as
1,x1,x2,x3
2,a1,a2
3,b1,b2,b3,b4
1,y1,y2,y3
2,c1,c2,c3
3,d1,d2

my out put should be as follows

x1,x2,x3,a1,a2,<null>,b1,b2,b3,b4
y1,y2,y3,c1,c2,c3,d1,d2,<null>

Please let me know how can we acheive this in informatica

Thanks in advance

Answer Posted / siva

Import the file with comma delimited, so that, it creates
with 5 columns c1,c2,c3,c4,c5
take the mapping as follows:
SQ --> Exp -->filter--> target_
in the expression take a variable port and assign the value
as iif(c1 = 1,concatenate all the c2,c3,c4,c5 otherwise
concatenate varibale post value with c2,c3,c4,c5)
then you will get as follows:
c1, v_p
1, 'x1,x2,x3,<null>'
2, 'x1,x2,x3,<null>,a1,a2,<null>,<null>'
3, 'x1,x2,x3,<null>,a1,a2,<null>,<null>,b1,b2,b3,b4'
1, 'y1,y2,y3,<null>
2, 'y1,y2,y3,<null>,c1,c2,c3,<null>
3, 'y1,y2,y3,<null>,c1,c2,c3,<null>,d1,d2,<null>,<null>'

you can lso ingnore the unncessary columns where ever

filter out only c1 = 3 to the target

It helps you to succeed..

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does reusable transformation mean?

1068


What is substr in informatica?

1131


What is lookup change?

983


What is union transformation?

906


How do you load unique records into one target table and duplicate records into a different target table?

1162


How an expression transformation differs from aggregator transformation?

988


What are the transformations that are not supported in mapplet?

954


How can we send the flat file data to different targets(which are also flat files) based on the name of flat file with out adding extra columns?

2116


Mine is Insurance Domain, So interviewer asked about terms like underwriting, disbursement amt, Reinsurance

1950


What is pmcmd command?

1044


What are the differences between joiner transformation and source qualifier transformation?

1094


If I have 10 flat files with same name abc.txt files with different timestamps as source I need to load them in tgt table oracle. in between job execution fails and rows are not loaded into tgt. how can I make them load in that target even if my job fails?

1426


Why do you use Mapping Parameter and mapping variable?

1677


can anybody send me some real time screenshots of mapping in informatica powercenter. i will be vary thankful to him. my e-mail id :- prakashkumar.kumhar@gmail.com

4676


How can you validate all mappings in the repository simultaneously?

1286