In this post, explaining Pivot operation in ODI 12c. Source data available in the Before_Pivot table and pivoted data available in the After_Pivot table.

Data View of Before_Pivot table.

Data View of After_Pivot table.

Create New mapping and connect Source , and target table as below using PIVOT component.

Click on the PIVOT component and configure as below.



Once executed, data will be available as below.

Thanks You !!!!
CREATE TABLE Before_Pivot(
year NUMBER,
quarter VARCHAR2(255),
sales NUMBER
);
insert into Before_Pivot values (2012, 'Q1', 10.5);
insert into Before_Pivot values (2012, 'Q2', 11.4);
insert into Before_Pivot values (2012, 'Q3', 9.5);
insert into Before_Pivot values (2012, 'Q4', 8.7);
insert into Before_Pivot values (2013, 'Q1', 9.5);
insert into Before_Pivot values (2013, 'Q2', 10.5);
insert into Before_Pivot values (2013, 'Q3', 10.3);
insert into Before_Pivot values (2013, 'Q4', 7.6);
commit;
CREATE TABLE After_Pivot (Step1:- Import both table into Model folder
year NUMBER,
Q1_SALE NUMBER,
Q2_SALE NUMBER,
Q3_SALE NUMBER,
Q4_SALE NUMBER
);
Data View of Before_Pivot table.
Data View of After_Pivot table.
Create New mapping and connect Source , and target table as below using PIVOT component.
Click on the PIVOT component and configure as below.
Once executed, data will be available as below.
Thanks You !!!!
ODI 12c :- Oracle Data Integrator 12c PIVOT example
Reviewed by Pubudu Dewagama
on
12:22:00 AM
Rating:
No comments: