STEP 1 : Creating and Reverse Engineering Source
- We can use EMP table of SDBU schema as source
- Reverse engineer EMP table into SOURCE MODEL
STEP 2 : Creating and Reverse Engineering Target
- Create target table in Target Schema using below script
Create Table Tgt_function
(
Empno Number ,
Ename Varchar2(20),
Sal Number ,
Deptno Number ,
Dname Varchar2(20)
)
|
- Reverse engineer into TARGET MODEL
STEP 3 : Create database function
- Create Database Function
CREATE OR REPLACE
FUNCTION RR_GET_DNAME
(
pDEPTNO IN NUMBER)
RETURN VARCHAR2
IS
DNAME VARCHAR2(11);
BEGIN
SELECT DNAME INTO DNAME FROM DEPT WHERE DEPTNO = pDEPTNO;
RETURN(DNAME);
END;
|
STEP 4 : Creating Interface/Mapping
- Create interface with the name of INT_CALL_FUNCTION
- Click on mapping tab → Drag and drop source (EMP)and target (Tgt_function)in respective locations
- Select DNAME column → In properties window → under implementation → Click on Edit → call the function as shown → click on ok
- Flow tab
- Select Target and select IKM SQL Control Append
- Select FLOW_CONTROL = False
- Click on SAVE
- Click on RUN
- Observe output