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. 

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

Post a Comment

Popular posts from this blog

Informatica Repository Queries to get connection names, command tasks and event wait file names

SQL Test : Sample Questions from Amazon Test (1/2)

SQL Test : Sample Questions from Amazon Test (2/2)