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

How to open an older version of an object in the workspace?

620


Do you find any difficulty while working with flat files as source and target?

680


What is workflow manager?

579


1)you have multiple source system where u receive files ,how do you actually load into mapping using transformation,what are the transformation you use? 2)you have files in ftp location ,how do you get it into mapping with you ETL concept?

1692


Suppose we configure sorter transformations in the master and detail pipelines with the following sorted ports in order: item_no, item_name, price. When we configure the join condition, what are the guidelines we need to follow to maintain the sort order?

656






Explain why we use partitioning the session in informatica?

617


What is an expression transformation?

594


What is informatica metadata and where is it stored?

591


Define filter transformation?

628


Describe an informatica powercenter?

609


What is event and what are the tasks related to it?

620


What is rank index in rank transformation?

608


What is data caches/ index caches?

617


How does a rank transform differ from aggregator transform functions max and min?

676


Suppose we have two source qualifier transformations sq1 and sq2 connected to target tables tgt1 and tgt2 respectively. How do you ensure tgt2 is loaded after tgt1?

786