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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I have a flat file, want to reverse the contents of the flat file

706


What is the format of informatica objects in a repository?

605


What can we do to improve the performance of informatica aggregator transformation?

626


Write the different tools in the workflow manager?

579


Enlist the various types of transformations.

566






HOW TO PROCESS THE ROWS FROM JOINER AND EXPRESSION TRANSFORAMTION TO SORTER TRANSFORMATION

1487


if we have a delimiters at unwanted places in a flat file how can we over come those.

1576


What is a surrogate key?

567


Can we create a node as a gateway node and the same node can be assigned to a grid?

644


How to create different types of slowly changing dimensions (SCD) in informatica using the mapping wizard?

634


In What Situations we can use MappingParameters ,Mapping Variables AND Session Parameters in REAL TIME.

1542


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?

1037


Explain how many types of dimensions are available in informatica?

602


What is a grid in Informatica?

622


What are the modules in Power Center

1246