際際滷 explain about slowly changing dimension type 1 using pentaho only Inserting new record in the base table.
1 of 23
Download to read offline
More Related Content
Unit 2 - Slowly Changing Dimension Type 1 (SCD1) (insert)
1. Unit 2 Slowly Changing Dimension SCD type 1 (Insert)
Dr. Girija Narasimhan 1
https://www.oercommons.org/authoring/28693-etl-using-pentaho-spoon-lecture-notes-ppt-exercise/2/view
https://www.oercommons.org/authoring/28550-etl-using-pentaho-spoon
2. create table student_scd1(sid number(5) not null,sname varchar2(15),mark1 number(5),result varchar2(10),grade
varchar2(3));
insert into student_scd1 values(11,'Ambu',89,'Pass','A');
insert into student_scd1 values(12,'Meenu',75,'Pass','B');
insert into student_scd1 values(13,'Jasica',45,Fail',D');
select * from student_scd1;
create table student_dim_scd1(dim_sid number(5) not null, sname varchar2(15),mark1 number(5),result
varchar2(10),grade varchar2(3));
insert into student_dim_scd1 values(11,'Ambu',89,'Pass','A');
insert into student_dim_scd1 values(12,'Meenu',75,'Pass','B');
insert into student_dim_scd1 values(13,'Jasica',45,'Fail','D');
select * from student_dim_scd1;
update student_scd1 set mark1=60,grade='C',Result='Pass' where sid=13;
select * from student_scd1; Dr. Girija Narasimhan 2
6. Right click the mouse in
Table input and select Edit
step
Dr. Girija Narasimhan 6
7. Select New get Database
connection details
Computer name in the
property of the system
Click the Test Button
Database name is xe, Database user
name hr and password of the user hr
13
4
2
5
Dr. Girija Narasimhan 7
23. Exercise:
create table employ1(eid number(5) not null,ename varchar2(15),salary number(5));
insert into employ1 values(1001,'Alaa',1800)
insert into employ1 values(12,Ravi',1500);
select * from employ1;
create table emp_dim_scd1(dim_eid number(5) not null, ename varchar2(15),salary number(5));
insert into emp_dim_scd1 values(1001,'Alaa',1800)
insert into emp_dim_scd1 values(12,Ravi',1500);
select * from emp_dim_scd1;
Instruction :
Create employ1, emp_dim_scd1 table in oracle_xe.
Using Spoon, include table input connect employ1 table,
insert/update tag include emp_dim_scd1 dimension table, run the transformation and execute the result
Insert into employ1(13,Rajaa,2400); record in the employ1 table, again execute the result in spoon
Display emp_dim_scd1 dimension table newly inserted row details are included.Dr. Girija Narasimhan 23