Exercise 2:Source Qualifier Transformation
Step1: Import source tables
- Import EMP,DEPT and SALGRADE tables from SCOTT schema to informatica source Analyzer
Step 2 : Create a target Table and import as a target
- Open SQL Developer and type below sql query in Target schema
- CREATE TABLE EMP_DEPT_SAL_GRADE (DNAME VARCHAR2(20),DEPT_WISE_SALARY NUMBER(10,2),GRADE NUMBER);
Step3: Create mapping with the name of m_SQ1
- Drag and Drop sources EMP,DEPT,SALGRADE and target EMP_DEPT_SAL_GRADE tables to mapping workplace
- Delete the above SQ_DEPT,SQ_SALGRADE source qualifiers tables
- Drag and drop DEPTNO,DNAME,LOC from DEPT table to SQ_EMP table
- Drag and drop GRADE,HISAL ,LOSAL from SALGRADE table to SQ_EMP table.
- Connect DNAME ,SAL and GRADE from source qualifier to Target table
- Double click on Source Qualifier SQ_EMP → Click on Properties Tab
- Click on SQL Query down arrow mark
- In SQL Editor window provide below information
- ODBC data source as “RRITEC_SOURCE”
- USER NAME as: SOURCE_USER
- Password as: SOURCE_USER
- Click on Generate SQL → then automatically Query will be generated
SELECT DEPT.DNAME, EMP.SAL, SALGRADE.GRADE
FROM
EMP, DEPT, SALGRADE
WHERE
DEPT.DEPTNO=EMP.DEPTNO
- Modify Query as shown below
SELECT DEPT.DNAME, SUM(EMP.SAL)SAL,SALGRADE.GRADE FROM
DEPT,EMP,SALGRADE
WHERE
DEPT.DEPTNO=EMP.DEPTNO
AND SAL>=LOSAL AND SAL<=HISAL
GROUP BY
DNAME,GRADE
- Click on OK → Click on OK → Save Mapping
- Create a session and workflow
- Run the workflow