Friday, 6 February 2015

Convert one row into multiple rows in Informatica by using SQL transformation.

Scenario 1: convert one source row into multiple rows of the target.

For this scenario, I have seen lot of examples by using Java trns and Procedure Trns. But those are some what difficult to implement/understand.

In this example, I am using SQL Transformation to do the same.

Source:                                                                                               Target

  Val                                                                                                      Val
---------                                                                                           ---------------                        
   10                                                                                                         1
                                                                                                                2
                                                                                                                3
                                                                                                                4
                                                                                                                .
                                 
Step 1:
Import the source and target tables into informatica designer.

Step 2: 
Create the SQL Transformation then create input and output links after that configure the SQL query as shown in below.







SQL Query: SELECT LEVEL FROM DUAL CONNECT BY LEVEL<=10


Step 3:
Connect the links between SQL Trans and target.





Then create the session and run the workflow. 
Now check the Target table, you would see the desired result. :) :)


If you want to get the mapping XML please leave a comment or send your mail id to me.














No comments:

Post a Comment