Friday, June 19, 2015

Informatica Scenario: How to get salary and commission as column values when they both mentioned in same column data in source with type?


SRC:

Source data looks like below. Here Type=S means salary and Type=C means commission. 



Target:

we need salary and commission should come as columns against empid. 



Mapping Flow:
Below is the SQL logic:

SELECT S.EMPID, S.AMT AS SAL, C.AMT AS COM
  FROM (SELECT *
          FROM test_emp_sal_com
         WHERE TYPE = 'S') S
       LEFT OUTER JOIN (SELECT *
                          FROM test_emp_sal_com
                         WHERE TYPE = 'C') C
          ON C.EMPID = S.EMPID

same logic has been implemented using Informatica and the below is the mapping data flow.




same logic can also be used by using lookup on source. 

3 comments:

  1. It is the best blog with images&logic. For any other information and tutorials can visit .....

    Check this site Tekslate for indepth informatica-training
    Go here if you’re looking for information on informatica-training

    ReplyDelete
  2. I feel Informatica and other aspects and products really help one provide solutions about more tools and solutions.

    Informatica Read JSON

    ReplyDelete