Рет қаралды 4,817
Hi Friends , in this example , we will learn how to implement SCD TYPE 2 with effective date approach using the lookup .
below are the DDL and data set you can use while practicing .
Source DDL and data
CREATE TABLE EMP
( "EMPNO" NUMBER(4,0),
"ENAME" VARCHAR2(10 BYTE),
"JOB" VARCHAR2(9 BYTE),
"SAL" NUMBER(7,2),
"COUNTRY" VARCHAR2(100 BYTE)
)
DATA :
Insert into EMP (EMPNO,ENAME,JOB,SAL,COUNTRY) values (7369,'SMITH','DEVELOPER',800,'UNITED KINGDOM');
Insert into EMP (EMPNO,ENAME,JOB,SAL,COUNTRY) values (7499,'ALLEN','SALESMAN',1600,'INDIA');
Insert into EMP (EMPNO,ENAME,JOB,SAL,COUNTRY) values (7521,'WARD','SALESMAN',1250,'UNITED KINGDOM');
target DDL
CREATE TABLE EMP_SCD2_EFF_DT
( "EMP_KEY" NUMBER(38,0) NOT NULL ENABLE,
"EMPNO" NUMBER(4,0) NOT NULL ENABLE,
"ENAME" VARCHAR2(10 BYTE),
"JOB" VARCHAR2(9 BYTE),
"SAL" NUMBER(7,2),
"COUNTRY" VARCHAR2(100 BYTE),
"EFF_DT" TIMESTAMP (6),
"END_DT" TIMESTAMP (6),
CONSTRAINT "EMP_SCD2_EFF_DT_PK" PRIMARY KEY ("EMP_KEY")
#informatica #iics #informática #tutorial #etltesting #datawarehouse #sql