get me the resultant
input:- 1 x,y,z output:- 1 x
2 a,b 1 y
3 c 1 z
2 a
2 b
3 c

Answers were Sorted based on User's Feedback



get me the resultant input:- 1 x,y,z output:- 1 x 2 a,b 1 y ..

Answer / zer0

I think this might work for you .........

Use the following flow :

Source ---> SQ ---> Expression ---> Normalizer ---> Filter -
--> Target

In the expression use variable ports to form 3 columns
depending on the values received in Column2. I mean to say
the given value is X,Y,Z in column2 so create 3 ports and
eac port will have 1-1 values i.e. X then Y then Z.
For this use SUBSTR and INSTR functions.
SUBSTR to get the part of the string and INSTR to find the
position.

VARIABLE_PORT1 ---> substr(column2,1,1)

VARIABLE_PORT2 ---> IIF(instr(column2,',',1,1)!=0,substr
(column2,instr(column2,',',1,1)+1,1),NULL)

VARIABLE_PORT3 ---> IIF(instr(column2,',',1,2)!=0,substr
(column2,instr(column2,',',1,2)+1,1),NULL)


Direct the variable ports to 3 output ports and this output
ports will go to normalizer. In normalizer create 2 ports
Column1 and Column2 and put the number of occurances for
column2 as 3.

The output will be 2 ports from normalizer which will be
feed to filter. In filter, filter out the null values in
column2 if it exists (IIF(ISNULL(Column2),FALSE,TRUE)

Direct the output of filter to target.

Hope this works !!!!!!!!!!

Revert Back if it works

Is This Answer Correct ?    7 Yes 1 No

get me the resultant input:- 1 x,y,z output:- 1 x 2 a,b 1 y ..

Answer / kondeti srinivas

HI Zer0 YOUR SOLUTION PERFECTLY WORKING GREAT BUDDY

Is This Answer Correct ?    0 Yes 0 No

get me the resultant input:- 1 x,y,z output:- 1 x 2 a,b 1 y ..

Answer / j

Great!!!
It worked really well.
Thanks for the solution.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Informatica Interview Questions

what is diff between IN and EXIT commands

1 Answers   HCL, Schneider,


How to generate or load values in to the target table based on a column value using informatica etl tool.

0 Answers   Informatica,


In informatica workflow manager, how many repositories can be created?

0 Answers  


When will you use SQL override in a lookup transformation?

1 Answers  


write a query for how to eliminate the duplicate rows without using distinct?

6 Answers   iGate,






How to import oracle sequence into Informatica?

3 Answers   Satyam,


By using Filter Transformation,How to pass rows that does not satisfy the condition(discarded rows) to another target?

14 Answers   CSC, Emphasis,


what is worklet and what use of worklet and in which situation we can use it?

4 Answers   Patni, TCS,


What is data merging,data cleansing,sampling?

4 Answers  


Source as 1 1 2 2 3 3 How to get target as 1 2 3 and 1 2 3

3 Answers   CTS,


delete data from staging table as it loads to target table.here is the case we are getting data from 3 different server.a b and c.the data from server A loaded into staging table and we ran the task and data loaded to target table.now today data from server B and C also got loaded to the staging table.now what techniques and what transformations should be used to delete only the data which has been loaded only to the target.we need to delete only that data from staging which has been loaded into the target.looking for your responses

2 Answers   Motorola,


hi all, Can anyone please tell me the relationship between informatica and business objects

1 Answers  


Categories