You are on page 1of 8

TUGAS KCB 2 ETL

M ARIEF AKBAR
Case Studi
EKSTRAKSI DATA

Target Source Transformation


Table Name Column Name Data Table Name Column Name Data type
Type
Produk Prod_key Varchar Product PROD_Code Varchar INSERT INTO
PRODUK(PROD_
KEY) SELECT
PROD_CODE
FROM PRODUCT

Prod_Vendor Integer Product VEND_Number Integer INSERT INTO


PRODUK(PROD_
VENDOR)
SELECT
VEND_NUMBER
FROM PRODUCT
Prod_Price_Ra Varchar Product PROD_Price Double
nge
Prod_Discoun Double Product PROD_Discount Double INSERT INTO
t PRODUK(PROD_
DISCOUNT)
SELECT
PROD_DISCOUN
T FROM
PRODUCT
Prod_Name Varchar Product PROD_Descript Varchar INSERT INTO
PRODUK(PROD_
NAME)
SELECT
PROD_DESCRIPT
FROM PRODUCT
Sales Unit Integer Line LINE_Units Integer INSERT INTO
Sales(unit)
SELECT
LINE_UNIT
FROM LINE
Price Double Line LINE_Price Double INSERT INTO
Sales(price)
SELECT
LINE_PRICE
FROM LINE
Amount Double Line LINE_Amount Double INSERT INTO
Sales(amount)
SELECT
LINE_AMOUNT
FROM LINE
Time Time_key Integer Auto numbering
Time Year Invoice INV_DATe Date INSERT INTO
TAHUN
SELECT
(YEAR(INV_DAT
E))
FROM INVOICE
Bulan Integer Invoice INV_DATE Date INSERT INTO
BULAN
SELECT
(MONTH(INV_D
ATE)) FROM
INVOICE
Customer Cust_Key Integer Customer CUST_Number Integer INSERT INTO
CUST_KEY
SELECT
CUST_NUMBER
FROM
CUSTOMER
Cust_Lokasi Integer Customer CUST_AREACOD Integer INSERT INTO
E CUST_LOKASI
SELECT
(CUST_AREACO
DE)
FROM
CUSTOMER
Customer_Na String Customer CUST_Lname String INSERT INTO
me CUST_Fname CUST_NAME
SELECT
CUST_NAME
FROM
CUSTOMER
Skema Star

Produk Time
Sales
Prod_key Time_key
FK_Prod_key
Prod_Vendor Tahun
FK_ Time_key
FK_Cust_Key
Prod_Price_Range Bulan
Unit
Prod_Discount
Customer
Price
Prod_Name Cust_Key
Cust_Lokasi
Amount

Customer_Name
ETL

Sales

Produk_Key Cust_Key Time_Key Unit Price Amount


13-Q2/P2 10014 310106 3 14.99 44.97
23109-HB 10014 310106 1 9.95 9.95
54778-2T 10011 310106 2 4.99 9.98
2238/QPD 10012 310106 4 38.95 155.80
1546-QQ2 10012 310106 1 39.95 39.95
13-Q2/P2 10012 310106 5 14.99 74.95
54778-2T 10011 310106 3 4.99 14.97
23109-HB 10011 310106 2 9.95 19.90
PVC23SRT 10018 310106 12 5.87 70.44
SM-18277 10014 310106 3 6.99 20.97
2232/QTY 10014 310106 1 109.92 109.92
23109-HB 10014 310106 1 9.95 9.95
89-WRE-Q 10014 310106 1 256.99 256.99
13-Q2/P2 10015 310106 2 14.99 29.98
54778-2T 10015 310106 1 4.99 4.99
PVC23DRT 10011 310106 5 5.87 29.35
WR3/TT3 10011 310106 4 119.95 479.80
23109-HB 10011 310106 1 9.95 9.95
89-WRE-Q 10011 310106 2 256.99 513.98
89-WRE-Q 10016 310106 1 256.99 256.99

Produk

Prod_Key Prod_Vendor Prod_Price_range Prod_Discount Prod_Name


11QER/31 25595 <150 0.00 Power painter, 15 psi, 3-noxxle
13-Q2/P2 21344 <50 0.05 7.25-in, pwr, saw blade
14-Q1/L3 21344 <50 0.00 9.00-in, pwr, saw blade
1546-QQ2 23119 <50 0.00 Hrd cloth, -in, 2x50
1558-QW1 23119 <50 0.00 Hrd cloth, -in, 2x50
2232/QTY 24288 <150 0.05 B&D jigsaw, 12-in, blade
2232/QWE 24288 <100 0.05 B&D jigsaw, 8-in, blade
2238/QPD 25595 < 50 0.05 B&D cordless drill, -in
23109/HB 21225 < 50 0.10 Claw hammer
23114-AA NULL < 50 0.05 Sledge hammer, 12 lb
54778-2T 21344 < 50 0.00 Rat-tail file, 1/8-in , fine
89-WRE-Q 24288 < 300 0.05 Hicut chain saw, 16 in
PVC23DRT NULL < 50 0.00 PVC pipe, 3.5-in, 8-ft
SM-18277 21225 < 50 0.00 1.25-in, metal screw, 25
SW-23116 21231 < 50 0.00 2.5-in, wd. Screw, 50
WR3/TT3 25595 <150 0.10 Steel matting, 4x8x1/6, .5 mesh
Customer

Cust_key Cust_Lokasi Cust_Name


10010 615 Alfred Ramas
10011 713 Leona Dunne
10012 615 Smith Kathy
10013 615 Paul Olowski
10014 615 Myron Orlando
10015 713 Amy OBrian
10016 615 James Brown
10017 615 George Williams
10018 713 Anne Farriss
10019 615 Olette Smith

Time

Time_Key Bulan Tahun


310106 Januari 2006
290206 Februari 2006
310306 Maret 2006
310107 Januari 2007
300407 April 2007