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 do you mean by channel change?

535


define galaxy repository in informatica

1721


What is transformation?

655


What are the types of schemas we have in data warehouse.

526


is there any way to read the ms excel datas directly into informatica?like is there any possibilities to take excel file as target?

617






What is exclusive and normal mode for repository services?

709


Describe the scenarios where we go for joiner transformation instead of source qualifier transformation?

611


What is domain in terms of informatica?

561


How can we update a record in the target table without using update strategy?

649


How do you use reject loader.

2067


What is the difference between STOP and ABORT options in Workflow Monitor?

691


Give some information on report bursting and how to do it in bca as I have to split the report and send different reports to different people?

548


Where are the source flat files kept before running the session?

622


Where can we find the throughput option in informatica?

600


Design a mapping to get the pervious row salary for the current row. If there is no pervious row exists for the current row, then the pervious row salary should be displayed as null.

777