ODI 12c :- Create Simple Mapping (ETL Job) using Oracle Data Integrator

In this post, I’m going to explain how to  create simple ODI mapping(ETL Job) for data migration. my source system is Employee_SRC and destination table name is  Employee_DEST.
If you not aware to install ODI 12c on windows environent please refer my previouse post (https://pubududewagama.blogspot.com/2017/08/how-to-install-oracle-data-integrator.html)
Below are the table stucture and the data of the OLTP and OLAP.
Employee_SRC DDL:-
create table Employee_SRC(
  empno    number(4,0) primary key ,
  ename    varchar2(10),
  job      varchar2(9),
  mgr      number(4,0),
  hiredate date,
  sal      number(7,2),
  comm     number(7,2),
  deptno   number(2,0)

);
Employee_SRC Sample Data:-
insert into Employee_SRC values(1, 'KING', 'PRESIDENT', null,to_date('17-11-1981','dd-mm-yyyy'),5000, null, 10);
insert into Employee_SRC values(7698, 'BLAKE', 'MANAGER', 7839,to_date('1-5-1981','dd-mm-yyyy'),2850, null, 30);
insert into Employee_SRC values(7782, 'CLARK', 'MANAGER', 7839,to_date('9-6-1981','dd-mm-yyyy'),2450, null, 10);
insert into Employee_SRC values(7566, 'JONES', 'MANAGER', 7839,to_date('2-4-1981','dd-mm-yyyy'),2975, null, 20);
insert into Employee_SRC values(7788, 'SCOTT', 'ANALYST', 7566,to_date('13-JUL-87','dd-mm-rr') - 85,3000, null, 20);
insert into Employee_SRC values(7902, 'FORD', 'ANALYST', 7566,to_date('3-12-1981','dd-mm-yyyy'),3000, null, 20);
insert into Employee_SRC values(7369, 'SMITH', 'CLERK', 7902,to_date('17-12-1980','dd-mm-yyyy'),800, null, 20);
insert into Employee_SRC values(7499, 'ALLEN', 'SALESMAN', 7698,to_date('20-2-1981','dd-mm-yyyy'),1600, 300, 30);
insert into Employee_SRC values(7521, 'WARD', 'SALESMAN', 7698,to_date('22-2-1981','dd-mm-yyyy'),1250, 500, 30);
insert into Employee_SRC values(7654, 'MARTIN', 'SALESMAN', 7698,to_date('28-9-1981','dd-mm-yyyy'),1250, 1400, 30)
insert into Employee_SRC values(7844, 'TURNER', 'SALESMAN', 7698,to_date('8-9-1981','dd-mm-yyyy'),1500, 0, 30);
insert into Employee_SRC values(7876, 'ADAMS', 'CLERK', 7788,to_date('13-JUL-87', 'dd-mm-rr') - 51,1100, null, 20);
insert into Employee_SRC values(7900, 'JAMES', 'CLERK', 7698,to_date('3-12-1981','dd-mm-yyyy'),950, null, 30);
insert into Employee_SRC values(7934, 'MILLER', 'CLERK', 7782,to_date('23-1-1982','dd-mm-yyyy'),1300, null, 10);
Employee_DEST DDL:-
create table Employee_DEST(
  empno    number(4,0) primary key,
  ename    varchar2(10),
  job      varchar2(9),
  mgr      number(4,0),
  hiredate date,
  sal      number(7,2),
  comm     number(7,2),
  deptno   number(2,0)
);
Open the ODI Studio.
image
Click on the ‘Connect to Repository ’ to connect the ODI studio.
image
Once you connect give the credentials for Connection.
image
Go to the Topology Tab and Select the Oracle Physical Architecture and click on the New Data Server.
image
Then give the Data server Details as below.
image
Give the JDBC details in the JDBC menu.
image
Click Test Connection button and should have successfull connaction.
image
Click on the Test Connection button and Check the connectivity and we have successful connection with our physical Database.
image
Then we can see the Created Data server in the Physical Architecture under Oracle Technology.
Then select the created Data Server and Create Physical Schema for that.
image
Give the name for Physical schema.
image
Go toContext tab and Give Logical schema name.
image
then you can see the that logical schema under Logical Architecture as below.
image
Go to the Designer Tab and expand the model manu and create  new model folder for import tables (Employee_SRC and Employee_DEST)
image
image
Right Click on the New model folder and create new model.
image
In the definition tab ,Give the appropraiate name, Technology(Oracle) and created logical schema.
image
Then go to the Selective Rivers_Engineering Tab and Select the Source table
image
Then Click on the Rivers Engineer Button.you can see the import tables from the table.
image
If data is avaiable in you table you can view data by click on the table and and select View data.
image
image
Database Ourput:-
image
Using that source table you can load to any type of database table as a destination table.
Creating a Mapping:-
Go to Designer table and create new project as below.
image
You can see the folder hierachy as below.
image
Go to First Folder and expand it. Under Mapping create New Mapping.
image
image
Once you save the mapping, will see as below.
image
Drag and drop the Employee_SRC model to default area of the logical tab in the created mapping sheet. Then drang and drop the Employee_DESC model to mapping sheet as below.
image
Draw the arrow as below.
image
Select Match option as below.
image
Save the map.
image
Click on the Run button.Click Ok.
image
Click Ok.
image
Go to the operator Tab and check the status of the execution.
image
Then go to the model menu of the Designer tab and view the data of destination table.
image
Go to the Database and check the Data of the destination table.
image
Thank you !!!!
ODI 12c :- Create Simple Mapping (ETL Job) using Oracle Data Integrator ODI 12c :- Create Simple Mapping (ETL Job) using Oracle Data Integrator Reviewed by Pubudu Dewagama on 9:42:00 PM Rating: 5

No comments: