Professional Documents
Culture Documents
1a
Case Study
Note:
Page 1 of 75
Case Study
Table of Contents
1. Introduction ................................................................................................. 3
2. OLTP Model .................................................................................................. 6
3. Dimension Model ............................................................................................ 7
3.1. Signing Fact Table ..................................................................................... 7
3.2. Premium Fact Table .................................................................................. 8
3.3. Claim Fact Table ...................................................................................... 9
4. High Level Project Plan for all Stages ................................................................ 10
5. ETL Job Design ............................................................................................ 12
5.1. Staging Area Specification ......................................................................... 12
5.2. Data Warehousing Job specifications ............................................................ 16
6. Database Script to CREATE Tables .................................................................... 24
6.1. SCRIPT TO CREATE BASE TABLES .................................................................. 24
6.2. Script to CREATE STAGING TABLES ............................................................... 27
6.3. SCRIPT TO CREATE DIMENSION TABLES .......................................................... 28
6.4. Script to CREATE FACT TABLES ................................................................... 30
7. Jobs to load all the Tables .............................................................................. 32
7.1. JOBS TO LOAD ALL THE STAGING TABLES ....................................................... 32
7.1.1. Staging Table for Assured Detail .............................................................. 32
7.1.2. Staging Table for Insurer Detail ............................................................... 35
7.1.3. Staging Table for Broker Detail ............................................................... 37
7.1.4. Staging Table for Premium Detail ............................................................ 39
7.1.5. Staging Table for Policy Details. .............................................................. 41
7.1.6. Staging Table for Claim Detail ................................................................ 42
7.2. Jobs to Load all the Dimension tables ........................................................... 44
7.2.1. Dimension table for Assured ................................................................... 44
7.2.2. Dimension table for Insurer .................................................................... 46
7.2.3. Dimension table for Broker .................................................................... 49
7.2.4. Dimension table for Risk Coverage ........................................................... 51
7.2.5. Dimension table for Claim Rejection ........................................................ 52
7.2.6. Dimension table for Claim Reason ............................................................ 54
7.2.7. Dimension table for Time ...................................................................... 56
7.2.8. Dimension table for Currency ................................................................. 58
7.2.9. Dimension table for Paid by ................................................................... 60
7.2.10. Dimension table for Premium Type .......................................................... 62
7.3. JOBS TO LOAD ALL THE FACT TABLES ........................................................... 64
7.3.1. Fact Table for Signing Status .................................................................. 64
7.3.2. Fact Table for Premium ........................................................................ 65
7.3.3. Fact Table for Claim ............................................................................ 68
7.4. INTEGRATING ALL THE JOBS ....................................................................... 71
7.4.1. LOADING PREMIUM FACT TABLE ............................................................... 71
7.4.2. LOADING SIGNING FACT TABLE ................................................................ 72
7.4.3. LOADING CLAIM FACT TABLE................................................................... 73
7.4.4. INTEGRATING INSURANCE FACT TABLE ...................................................... 75
Page 2 of 75
Case Study
1. Introduction
Overview of Case study: ABC Brokerage Company is organization (Insurance
market) offering insurance brokerage services for high risk like ships, aero planes, oil
refineries etc. They want to build the data warehouse which allows them to analyze
the patterns associated to policy signing status, premium submission and claims
claimed till date.
Brokers (Agent) are front facers of insurance market. Any one who wants to get
insured (called Assured) need to contact broker for initial transaction. Broker in turn
identifies the underwriting agents (Called Insurers) and syndicates who can provide
protection for property and causality.
Brokers (i.e. agents) prepare reports, maintain records, seek out new clients, and,
in the event of a loss, help policyholders to settle policy holders insurance claims.
Assured/Broker/Insurer relationship
INSURANCE
COMPANY 1
CLIENT
Assured
RELATIONSHIP
INSURANCE
BROKER
Broker
TRANSACTION
INSURANCE
COMPANY 2
INSURANCE
COMPANY 3
Insurer
Insurers select what risks to insure and decide how much premium to be charged for accepting
those risks. Insurers can be one of the insurance company who take either entire risk or they
can share risk with other insurance company.
Based on above scenario, the whole of the transaction can be summed up in the following
tables. You are expected to refer given tables from existing transactional model.
1. Policy table
Columns
Policy_No(PK)
Policy_Date
Signing_status (y/n)
Signed_date
Assured_code(FK)
Insurer_code(FK)
Broker_Code(FK)
Policy_Type(FK)
Sum_Assured
Descriptions
The Policy number of each and every policy insured.
The date of the policy taken
The signing status of the policy
The Date on which policy is signed
The code for the Assured. Through whom policy has taken (Client /
customer code who gets insured/take insurance)
The code for the Insurer (Broker Code)
Broker Code
The type of the policy
The Assured Sum for the Policy
Page 3 of 75
Case Study
2. Policy Type
Columns
Policy_Type(PK)
Policy Desc
Descriptions
Policy type
Type of policies such as Normal/Reinsurance policy
Descriptions
Risk Coverage Code
Type of risks such as Airplane/Oil refineries/Ships etc
4. Policy_Transction_Detail
Columns
Transaction_No (PK)
Policy_No (FK)
Transaction_Type
(Premium/Claim)
Transaction_currency
Transaction_Amount
Risk_coverage_code(FK)
Descriptions
Transaction No
Unique Policy number
Type of Transaction whether Premium paid or Amount
claimed
Type of currency used for transaction
Amount of Transaction
Risk Area i.e. what to be insured is recorded here
5. Premium
Columns
Policy_No (FK)
Transaction_No (FK)
Premium_type_Code(FK)
Premium amount
Premium_paid_currency
Paid_by
Premium_Due_Date
Paid_date
Descriptions
Policy number
Transaction Number
The type of the premium such as
yearly/Yearly
The premium amount
The currency in which the premium is paid
Mode of payment (Cash/ cheque / DD)
Date by which Premium should be paid
Actual paid date of premium
Quarterly/Half
6. Claim
Columns
Policy_No(FK)
Transaction_No (FK)
Claim_type (FK)
Claim_amount
Assured_code (FK)
Claim_reason_code(FK)
claim_paid_currency
Claim_due_date
claim_paid_date
Claim_rejection_code(FK)
Description
Policy number
Transactions
Type of Claims which refers risk coverage table
Amount of claim
Assured code who applies for claim
Claim reason code
Claim Currency
Claim Due date
Claim paid date
Reason for claim rejection
Page 4 of 75
Case Study
7. Claim reason
Columns
Claim_reason_code(PK)
Claim_reason_desc
Descriptions
Claim reason code
Details of claim description
8. Claim Rejection
Columns
Claim_rejection_code(PK)
Claim_rejection_desc
Descriptions
Claim rejection code
Details of claim rejection
9. Assured_Details
Columns
Assured _code (PK)
Assured_Name
add_1
add_2
city
country_code (FK)
Descriptions
Assured Code
Name (first name, middle name and last name)
Address (street name, area)
Location name
City
Where from assured
10. Insurer_Details
Columns
Insurer_code (PK)
Insurer_Name
add_1
add_2
city
country_code (FK)
Descriptions
Insurer Code
Name (first name, middle name and last name)
Address (street name, area)
Location name
City
Where from Insurer is located
11. Country
Columns
Country_code(PK)
Country_name
Country_currency
Descriptions
Country Code
Country name
Country Currency
Descriptions
Broker Code
Name (first name, middle name and last name)
Address (street name, area)
Location name
City
Where from Insurer is located
Page 5 of 75
Case Study
2. OLTP Model
Based on above scenario following OLTP Model is built
Page 6 of 75
Case Study
3. Dimension Model
Insurance Market wish to build data warehouse to analyze the patterns associated to policy signing
status, premium submission and claims claimed till date. Following dimensional model is designed
to perform above task
3.1. Signing Fact Table
Page 7 of 75
Case Study
Page 8 of 75
Case Study
Page 9 of 75
Case Study
Job Name
4
5
6
Job Description
This Job extracts data from Assured table and joins
country table with respect to country code presented in
the
Assured
Table.
Holds
data
into
STG_ASSURED_DETAIL Table
This Job extracts data from Insurer_Detail table and
joins country_Detail table with respect to country code
presented in the insurer table. Holds data into
STG_INSURER_DETAIL table.
This job extract data from Broker_Detail table and joins
country_Detail table with respect to country presented
in
the
Broker
table.
Holds
data
into
STG_BROKER_DETAIL table.
This Job populates data from PREMIUM_DETAIL table
into STG_PREMIUM_DETAIL
This job extract data from POLICY_DETAIL and
populates into STG_POLICY_DETAIL
This job populates data from POLICY_DETAIL and
CLAIM_DETAIL into STG_CLAIM_DETAIL
This job populates data from assured detail
(STG_ASSURED_DETAIL) into Assured Dimension
and also generates surrogate key for every record
inserted.
10
11
12
13
14
Page 10 of 75
15
16
17
18
19
20
21
22
23
24
Case Study
This
job
populates
static
information
from
PREMIUM_TYPE into DIM_PREMIUM along with
generating PREMIUM_KEY
This job populates static information from Paid_By (DB)
into DIM_PAID_BY along with generating PAID_BY
KEY
Page 11 of 75
Case Study
ASSURED_CODE
ASSURED_NAME
ADDRESS_1
ADDDRESS_2
PK
Error handling
Direct Mapping
P
K
Source
Table
ASSURED_CODE
20
ASSURED_NAME
20
Direct Mapping
20
ADDRESS_1
20
Direct Mapping
20
ADDDRESS_2
20
Direct Mapping
CITY
20
CITY
20
Direct Mapping
COUNTRY_NAME
40
COUNTRY.COUNTRY_
NAME
40
Look-up
(Country_Code)
ASSURE
STG
_1
STG_AS
SURED_
DETAIL
COUNT
RY
STG
_2
STG_INS
URER_D
INSURE
R
LAST_UPDATE_ON
INSURER_CODE
FK
LAST_UPDATE_ON
PK
INSURER_CODE
Constraints
Assure_
Code :
Not Null
Target Table
Transformation
Key Type
Column
name
Width
Source column
Key Type
Target column
Data Type
Source
Table
Width
Target
Table
Data Type
Load
Order
Column
name
Sr.
No
Assured_C
ode : PK
Country
_Code :
Not Null
STG_Assured_
Detail.Last_Upd
ate_On. lookup(Control.Job
Name and
Control.Last_U
pdate_On,
Control.Last_Ex
ecution_Date)
control table for
incrimental load
P
K
Direct Mapping
Insurer_
Code :
Page 12 of 75
Insurer_Co
de : PK
Source
Table
STG
_3
STG_BR
OKER_D
ETAIL
BROKE
R
COUNT
RY
20
Direct Mapping
ADDRESS_2
20
ADDRESS_1
20
Direct Mapping
20
ADDDRESS_2
20
Direct Mapping
CITY
20
CITY
20
Direct Mapping
COUNTRY_NAME
40
COUNTRY.COUNTRY_
NAME
40
LAST_UPDATE_ON
LAST_UPDATE_ON
BROKER_CODE
BROKER_CODE
BROKER_NAME
20
PK
Constraints
Source
Table
ADDRESS_1
Assured Code
and Country
Code goes to
STG_Insurer_
Detail_Reject_
Table
INSURER_NAME
Key Type
20
Error handling
Width
Key Type
INSURER_NAME
Transformation
Data Type
COUNT
RY
Source column
Column
name
ETAIL
Target column
Width
Target
Table
Data Type
Load
Order
Column
name
Sr.
No
Case Study
Target Table
Not Null
Country
_Code :
Not Null
Look-up
(Country_Code)
STG_Insurer_D
etail.Last_Updat
e_On. lookup(Control.Job
Name and
Control.Last_U
pdate_On,
Control.Last_Ex
ecution_Date)
control table for
incrimental load
P
K
Direct Mapping
BROKER_NAME
20
Direct Mapping
ADDRESS_1
20
ADDRESS_1
20
Direct Mapping
ADDDRESS_2
20
ADDDRESS_2
20
Direct Mapping
CITY
20
20
COUNTRY_NAME
40
CITY
COUNTRY.COUNTRY_
NAME
40
Direct Mapping
Look-up
(Country_Code)
Broker_
Code:
Not Null
Last_Up
date:
Not Null
Page 13 of 75
Broker_Cod
e: Not Null
Country_Co
de_ Not
Null
STG
_4
STG_PO
LICY_DE
TAIL
POLICY
_DETAIL
PREMIU
M__DET
AIL
STG
_5
STG_PR
EMIUM_
DETAIL
LAST_UPDATE_ON
POLICY_ID
SIGN_DATE
Constraints
LAST_UPDATE_ON
STG_Broker_De
tail.Last_Update
_On. lookup(Control.Job
Name and
Control.Last_U
pdate_On,
Control.Last_Ex
ecution_Date)
control table for
incrimental load
SIGN_DATE
Direct Mapping
Target Table
Error handling
Key Type
Transformation
Width
Data Type
Source column
Key Type
Target column
Column
name
Source
Table
Width
Target
Table
Data Type
Load
Order
Column
name
Sr.
No
Case Study
Source
Table
10
SIGN_STATUS
SIGN_STATUS
Direct Mapping
INSURER_CODE
10
INSURER_CODE
10
Direct Mapping
ASSURED_CODE
10
ASSURED_CODE
10
Direct Mapping
BROKER_CODE
10
BROKER_CODE
10
Direct Mapping
PREMIUM_ID
Direct Mapping
40
Premium_Detail..
Premium_Type_
code =
Premium_Type.P
remium_Type_C
ode
20
Direct Mapping
10
Direct Mapping
PREMIUM_TYPE_DETAIL
40
PREMIUM_CURRENCY
20
PREMIUM_AMOUNT
10
PK
PREMIUM_ID
Premium_Type_Code
PREMIU
M TYPE
PREMIUM_CURRENC
Y
PREMIUM_AMOUNT
Any Entry
where
Sign_Date is
null will be
sending to
STG_Policy_D
etail_Reject
table
All
Colums
: Not
Nulll
Assured_C
ode : Not
null
Insurer_Co
de : Not
Null
Status : Not
Null
Broker_Cod
e : Not Null
Policy_No :
Not Null
Premiu
m_Type
_Code:
Not Null
Page 14 of 75
20
PAID_BY
20
INSURER_CODE
10
FK
INSURER_CODE
10
ASSURED_CODE
10
FK
ASSURED_CODE
10
BROKER_CODE
10
FK
BROKER_CODE
10
20
20
10
Direct Mapping
20
Direct Mapping
RISK_COVERAGE_CODE
20
FK
CLAIM_REASON_CODE
20
FK
CLAIM_AMOUNT
10
RISK_COVERAGE_CO
DE
CLAIM_REASON_COD
E
CLAIM_AMOUNT
CLAIM_CURRENCY
CLAIM_CURRENCY
PAID_DATE
PAID_DATE
LAST_UPDATE_ON
LAST_UPDATE_ON
CLAIM_
DETAIL
Error handling
Constraints
Source
Table
Key Type
Width
PAID_BY
Transformation
Data Type
STG
_6
STG_CL
AIM_DET
AIL
Source column
Column
name
POLICY
_DETAIL
Target column
Key Type
Source
Table
Width
Target
Table
Data Type
Load
Order
Column
name
Sr.
No
Case Study
Direct Mapping
F
K
F
K
F
K
F
K
F
K
Direct Mapping
Direct Mapping
Direct Mapping
Direct Mapping
Direct Mapping
Direct Mapping
STG_Claim_Det
ail.Last_Update
_On. lookup(Control.Job
Name and
Control.Last_U
pdate_On,
Control.Last_Ex
ecution_Date)
control table for
incrimental load
Any
unsoloicited
record will go
to the
Claim_Detail_
Reject table.
Page 15 of 75
Target Table
Case Study
STG_AS
SURED_
DETAIL
1
DW
_1
DIM_AS
SURED
System generated
Number
Assured_Key
ASSURED_CODE
ASSURED_CODE
Direct Mapping
ASSURED_NAME
20
ASSURED_NAME
20
Direct Mapping
ADDRESS_1
20
ADDRESS_1
20
Direct Mapping
ADDRESS_2
20
ADDRESS_2
20
Direct Mapping
CITY
20
CITY
20
Direct Mapping
COUNTRY_NAME
40
COUNTRY_NAME
40
Direct Mapping
LAST_UPDATE_O
N
LAST_UPDATE_ON
Status
INSERTED_ON
PK
FK
Target
Table
Constraints
Source
Table
Error
handling
Key Type
Transformation
Width
Column
name
Source column
Key Type
Target column
Data Type
Source
Table
Width
Target
Table
Data Type
Load
Order
Column
name
Sr.
No
Assure_
Code :
Not Null
Assure_Key :
Not Null
Last_Up
date_on:
Not Null
Direct Mapping
ASSURED_DETAIL.
STATUS SHOULD
SET TO 'y' FOR
EVERY ACTIVATED
RECORD
System generated
Date
Page 16 of 75
Source
Table
INSURER_CODE
INSURER_CODE
PK
INSURER_NAME
20
INSURER_NAME
ADDRESS_1
20
ADDRESS_1
ADDRESS_2
20
ADDRESS_2
DW
_3
CITY
20
COUNTRY_NAME
40
LAST_UPDATE_O
N
DIM_BR
OKER
STG_BR
OKER_D
ETAIL
Error
Target
Table
Constraints
Source
Table
DIM
INSURE
R
Column
name
Insurer_Key
Key Type
Key Type
DW
_2
Transformation
Width
STG_IN
SURER_
DETAIL
Source column
Data Type
Target column
Width
Target
Table
Data Type
Load
Order
Column
name
Sr.
No
Case Study
handling
System generated
Number
Insurer_
Code:
Not Null
Insurer_Key :
Not Null
Direct Mapping
Last_Up
date_On:
Not Null
20
Direct Mapping
20
Direct Mapping
CITY
20
Direct Mapping
COUNTRY_NAME
40
Direct Mapping
LAST_UPDATE_ON
Direct Mapping
INSURER_DETAIL.S
TATUS SHOULD
SET TO 'y' FOR
EVERY ACTIVATED
RECORD
STATUS
INSERTED_ON
Broker_Key
BROKER_CODE
BROKER_CODE
BROKER_NAME
20
BROKER_NAME
ADDRESS_1
20
ADDRESS_1
System generated
Date
Direct Mapping
Broker_C
ode : Not
Null
20
Direct Mapping
Last_Up
date_On:
Not Null
20
Direct Mapping
PK
Page 17 of 75
Broker_Key: Not
Null
DIM_DA
TE
TIME.TX
T
ADDRESS_2
20
Direct Mapping
20
CITY
20
Direct Mapping
COUNTRY_NAME
40
COUNTRY_NAME
40
Direct Mapping
LAST_UPDATE_O
N
Direct Mapping
STATUS
BROKER_DETAIL.S
TATUS SHOULD
SET TO 'y' FOR
EVERY ACTIVATED
RECORD
INSERTED_ON
DATE_KEY
10
YEAR
10
YEAR
10
Direct Mapping
QUARTERS
10
QUARTERS
10
Direct Mapping
MONTH
10
MONTH
10
Direct Mapping
WEEK
10
WEEK
10
Direct Mapping
DAY_OF_THE_MO
NTH
10
DAY_OF_THE_MONTH
10
Direct Mapping
10
LOOKUP(STG_Policy_Det
ail.ASSURED_COD
E)
DIM_PAI
D_BY
PAID_BY
PAID_BY_KEY
Error
handling
Key Type
20
Column
name
CITY
Key Type
ADDRESS_2
INSURER_KEY
DW
_6
Transformation
Width
DW
_4
Source column
Data Type
Target column
Constraints
Target
Table
Source
Table
Width
Target
Table
Data Type
Load
Order
Column
name
Sr.
No
Case Study
Source
Table
System generated
Date
10
System Generated
Number
PK
FK
PK
INSURER_KEY
Payment_Mode_Code
PK
PK
Direct Mapping
Date_Ke
y : Not
Null
Payment
_Mode_
Code:
Not Null
Page 18 of 75
PAID_BY_KEY :
Not Null
DW
_10
DIM_PR
EMIUM
DIM_CU
RRENC
Y
DIM_RI
SK_CO
VERAG
E
20
INSERTED_ON
PREMIUM_KEY
PREMIUM_TYPE
20
INSERTED_ON
CURRENCY_KEY
PREMIUM_CURR
ENCY
20
INSERTED_ON
RISK_KEY
20
Key Type
Column
name
Payment_Mode_BY
Width
PAID_BY: Not
Null
Direct Mapping
Premium
_Type_C
ode : Not
Null
PREMIUM_KEY:
Not Null
Direct Mapping
premium
_Type :
Not Null
PREMIUM_TYP
E: Not Null
Direct Mapping
Currency
_Type_C
ode:Not
Null
Currency_Key:
Not Null
Direct Mapping
Currency
_Type:
Not Null
Premium_Curren
cy_ Not Null
System Generated
Date
PK
Premium_Type_Code
premium_Type
20
PK
System Generated
Date
PK
Currency_Type_Code
Currency_type
20
PK
CURRE
NCY
RISK_COVERAGE
_CODE
Constraints
Payment
_Mode_
BY : Not
Null
Direct Mapping
PREMIU
M_TYPE
RISK_C
OVERA
GE
Error
Target
Table
DW
_8
PAID_BY
Transformation
Source
Table
DW
_7
Source column
Key Type
Target column
Data Type
Source
Table
Width
Target
Table
Data Type
Load
Order
Column
name
Sr.
No
Case Study
handling
System Generated
Date
10
20
PK
RISK_COVEAGE_CODE
20
PK
Direct mapping
RISK_CO
VEAGE_
CODE :
PK
Page 19 of 75
DW
_11
DW
_12
DW
_5
DIM_CL
AIM_RE
ASON
DIM_CU
RRENC
Y
FACT_S
IGNING
_STATU
S
CLAIM_
REASON
CURRE
NCY
INSERTED_ON
CLAIM_KEY
10
CLAIN_REASON_
CODE
20
CLAIN_REASON_CODE
20
CLAIM_REASON_
DESC
20
CLAIM_REASON_DESC
20
INSERTED_ON
CURRENCY_KEY
CURRENCY_NAM
E
10
20
Constraints
Target
Table
20
Error
Source
Table
RISK_COVERAGE
_DESC
Key Type
Width
RISK_COVERAGE_DES
C
Transformation
Data Type
Source column
Column
name
Target column
Key Type
Source
Table
Width
Target
Table
Data Type
Load
Order
Column
name
Sr.
No
Case Study
handling
Direct mapping
System Generated
Date
PK
PK
Direct mapping
Direct mapping
System Generated
Date
PK
Direct Mapping
Currency_name
Direct mapping
System Generated
Date
INSERTED_ON
DIM_DA
TE
BROKER_KEY
10
FK
BROKER_KEY
10
PK
LOOKUP(STG_Policy_Det
ail.INSURER_CODE
)
Assured:
Key : Not
Null
DIM_BR
OKER
ASSURED_KEY
10
FK
ASSURED_KEY
10
PK
LOOKUP(STG_Policy_Det
ail.BROKER_CODE)
Insurer_
Key: Not
Null
DIM_AS
SURED
SIGN_DATE
10
FK
SIGN_DATE
10
PK
Broker_K
ey : Not
Null
Page 20 of 75
All Columns :
Not Nulll
DIM_INS
URER
STG_PO
LICY_DE
TAIL
DIM_DA
TE
DW
_9
FACT_P
REMIU
M
TOTAL_SIGN_POL
ICIES
TOTAL_UNSIGNE
D_POLICIES
INSERTED_ON
PREMIUM_KEY
10
10
SIGN_STATUS
SIGN_STATUS
Constraints
AGGREGATE
BASED ON
INSURER_KEY,BRO
KER_KEY,
ASSURED_KEY
AND SIGN_DATE
Where
STG_Policy_Detail.S
taus='Y'
Total_Pol
icy_Sign
Not null
AGGREGATE
BASED ON
INSURER_KEY,BRO
KER_KEY,
ASSURED_KEY
AND SIGN_DATE
Where
STG_Policy_Detail.S
taus='N'
Total_Pol
icy_Not_
Signed:
Not Null
Target
Table
Error
Source
Table
Key Type
Transformation
Width
Data Type
Source column
Column
name
Target column
Key Type
Source
Table
Width
Target
Table
Data Type
Load
Order
Column
name
Sr.
No
Case Study
handling
System Generated
Date
5
PREMIUM_KEY
Direct Mapping
DIM_BR
OKER
INSURER_KEY
INSURER_KEY
LOOKUP(STG_Policy_Det
ail.INSURER_CODE
)
DIM_AS
SURED
BROKER_KEY
BROKER_KEY
LOOKUP(STG_Policy_Det
ail.BROKER_CODE)
Premium
_Id : Not
Null
Assured_Key :
Npt Null
DIM_INS
URER
ASSURED_KEY
ASSURED_KEY
LOOKUP(STG_Policy_Det
ail.ASSURED_COD
E)
Premium
_Detail :
Not Null
Page 21 of 75
DW
_13
Transformation
PREMIUM_KEY
Direct Mapping
DIM_PAI
D_BY
PAID_BY_KEY
PAID_BY_KEY
Direct Mapping
DIM_CU
RRENCY
CURRENCY_KEY
CURRENCY_KEY
Direct Mapping
STG_PR
EMIUM_
DETAIL
DATE_KEY
DATE_KEY
Direct Mapping
AGGREGATE
BASED ON
INSURER_KEY,BRO
KER_KEY,
ASSURED_KEY
AND
DATE_KEY,PAID_B
Y_KEY,CURRENCY
_KEY AND
PREMIUM_KEY
Error
handling
Key Type
PREMIUM_KEY
Column
name
DIM_PR
EMIUM
Key Type
Width
Source column
Data Type
Target column
Constraints
Target
Table
Source
Table
Width
Target
Table
Data Type
Load
Order
Column
name
Sr.
No
Case Study
Source
Table
Premium
_Amount
: Not Null
Premium_Id :
Not Null
PREMIUM_AMOU
NT
INSERTED_ON
DIM_DA
TE
DATE_KEY
10
FK
DATE_KEY
10
PK
LOOKUP(STG_Policy_Det
ail.INSURER_CODE)
Assured:K
ey : Not
Null
DIM_BR
OKER
BROKER_KEY
10
FK
BROKER_KEY
10
PK
LOOKUP(STG_Policy_Det
ail.BROKER_CODE)
Insurer_K
ey: Not
Null
10
PREMIUM_AMOUNT
10
System Generated
Date
FACT_C
LAIM
Page 22 of 75
Source
Table
ASSURED_KEY
10
FK
ASSURED_KEY
10
PK
DIM_INS
URER
INSURER_KEY
10
FK
INSURER_KEY
PK
RISK_KEY
10
FK
RISK_KEY
10
PK
CLAIM_KEY
10
FK
CLAIM_KEY
10
PK
CURRENCY_KEY
FK
CURRENCY_KEY
PK
CLAIM_AMOUNT
10
CLAIM_AMOUNT
10
Not Null
SANCTIONED_AM
OUNT
10
CLAIM_AMOUNT
10
Not Null
INSERTED_ON
DIM_RIS
K_COVE
RAGE
DIM_CL
AIM_RE
ASON
DIM_CU
RRENCY
STG_CL
AIM_DE
TAIL
STG_CL
AIM_DE
TAIL
Source
Table
DIM_AS
SURED
handling
Key Type
Constraints
Width
Error
Data Type
Transformation
Column
name
Source column
Key Type
Target column
Width
Target
Table
Data Type
Load
Order
Column
name
Sr.
No
Case Study
Broker_K
ey : Not
Null
Total_Poli
cy_Sign
Not null
System Generated
Date
Page 23 of 75
Target
Table
Case Study
Page 24 of 75
Case Study
Case Study
Claim_Type
VARCHAR2(20) NOT NULL,
Claim_Reason_Code
VARCHAR2(20) NOT NULL,
Claim_Rejection_Code
VARCHAR2(20) NOT NULL,
PRIMARY KEY (Claim_id, Policy_No),
FOREIGN KEY (Policy_No) REFERENCES Policy_Detail,
FOREIGN KEY (Claim_Type) REFERENCES Risk_coverage,
FOREIGN KEY (Claim_Rejection_Code) REFERENCES Claim_rejection,
FOREIGN KEY (Claim_Reason_Code) REFERENCES Claim_Reason);
CREATE TABLE Premium_Detail (
Premium_id
NUMBER(10) NOT NULL,
Policy_No
NUMBER(10) NOT NULL,
Premium_Type_Code
VARCHAR2(20) NULL,
Premium_Currency
VARCHAR2(20) NULL,
Premium_Amount
NUMBER(10,2) NULL,
Paid_By
VARCHAR2(20) NULL,
Paid_Date
DATE NULL,
Due_Date
DATE NULL,
PRIMARY KEY (Premium_id, Policy_No),
FOREIGN KEY (Policy_No) REFERENCES Policy_Detail );
DROP TABLE CONTROL_TABLE;
CREATE TABLE control_table (
LAST_EXEC_DATE
CURRENT_EXEC_DATE
T_CODE
DATE,
DATE,
VARCHAR2(10) );
Page 26 of 75
Case Study
NUMBER(10)NULL,
NUMBER(10)NULL,
NUMBER(10)NULL,
NUMBER(10)NULL,
DATE NOT NULL,
VARCHAR2(20) NULL,
DATE NULL );
NUMBER(10)NOT NULL,
VARCHAR2(20) NULL,
VARCHAR2(20) NULL,
VARCHAR2(20) NULL,
VARCHAR2(20) NULL,
VARCHAR2(40) NULL,
DATE NULL );
NUMBER(10)NOT NULL,
NUMBER(10)NULL,
NUMBER(10)NULL,
VARCHAR2(20) NULL,
VARCHAR2(20) NULL,
VARCHAR2(20) NULL,
VARCHAR2(20) NULL,
VARCHAR2(40) NULL,
DATE NULL );
Page 27 of 75
Case Study
NUMBER(10)NOT NULL,
VARCHAR2(20) NULL,
VARCHAR2(20) NULL,
VARCHAR2(20) NULL,
VARCHAR2(20) NULL,
VARCHAR2(40) NULL,
DATE NULL );
Page 28 of 75
Case Study
Page 29 of 75
Case Study
Case Study
Page 31 of 75
Case Study
PARAMETERS
DESCRIPTION
Sources
Assured_Detail
Holds the details of the Assured Table that is fetched from the OLTP system.
Country_Detail
Control table
Targets
STG_Assured_Detail
It temporarily holds the structured data which has to be loaded in the Assured
Dimension table
Control_Detail
Holds the new dates after the records have been inserted.
In the Control_Table (Target), the Update action is chosen as User-Defined SQL and in the
Enter SQL the following statement is given
UPDATE CONTROL_TABLE SET LAST_EXEC_DATE = ?, CURRENT_EXEC_DATE = ?, T_CODE = ?
WHERE T_CODE='ADIM';
Page 32 of 75
Case Study
Transformations
Trn_to_Stg
Page 33 of 75
Case Study
Page 34 of 75
Case Study
PARAMETERS
DESCRIPTION
Sources
Insurer_Detail
Holds the details of the Insurer Table that is fetched from the OLTP
system.
Country_Detail
Control table
Targets
STG_Insurer_Detail
Control_Detail
Holds the new dates after the records have been inserted.
In the Control_Table (Target), the Update action is chosen as User-Defined SQL and in the
Enter SQL the following statement is given
UPDATE CONTROL_TABLE SET LAST_EXEC_DATE = ?, CURRENT_EXEC_DATE = ?, T_CODE = ?
WHERE T_CODE='IDIM';
Page 35 of 75
Case Study
Transformations
Trn_to_Stg
Matches the column Country_Code from the Insurer and Country_Detail and
merges all the details.
It performs lookup with the dates obtained from Control_table and then inserts
the records to the Staging Table.
Page 36 of 75
Case Study
PARAMETERS
DESCRIPTION
Sources
Broker_Details
Holds the details of the Broker Table that is fetched from the OLTP
system.
Country_Details
Control table
Targets
STG_Broker_Detail
Control_Detail
Holds the new dates after the records have been inserted.
In the Control_Table (Target), the Update action is chosen as User-Defined SQL and in
the Enter SQL the following statement is given
UPDATE CONTROL_TABLE SET LAST_EXEC_DATE = ?, CURRENT_EXEC_DATE = ?, T_CODE
= ? WHERE T_CODE=BDIM';
Page 37 of 75
Case Study
Transformations
Trn_to_Stg
Here also the dates are to be compared by applying the constraint as in the
previous Exercise.
For Ex.:
Link_Broker_to_Trn.LAST_UPDATE_DATE >= Link_Control_to_Trn.LAST_EXEC_DATE And
Link_Broker_to_Trn.LAST_UPDATE_DATE <= Link_Control_to_Trn.CURRENT_EXEC_DATE
This job loads the Staging Table for the Broker Details. From this the data is loaded
to the Broker Dimension table.
Page 38 of 75
Case Study
PARAMETERS
DESCRIPTION
Sources
Premium_Type
Premium_Detail
Policy_Detail
Holds complete information related to the policy like the policy number, the
policy date etc.
Targets
Stg_Premium_detail
A table that temporarily holds the structured data that is obtained from the
source tables.
Transformations
Trn_to_Stg
Page 39 of 75
Case Study
This Job fetches the data from the Premium_type, Premium_Detail and
Policy_Details table and populates the Stg_Premium_Detail.
Page 40 of 75
Case Study
Stg_Policy_Details
PARAMETERS
DESCRIPTION
Sources
Policy_Detail Table
Targets
Stg_Policy_Details
Transformations
Trn_Policy_Detail
A table that temporarily holds the structured data that is obtained from the source
tables.
Page 41 of 75
Case Study
This job loads the staging table for the Policy Details.
7.1.6. Staging Table for Claim Detail
Page 42 of 75
Case Study
Stg_Claim_Details
PARAMETERS
DESCRIPTION
Sources
Claim_Detail Table
Policy_Detail Table
Targets
Stg_Claim_Details
Transformations
Trn_Stg_Claim_Detail
A table that temporarily holds the structured data that is obtained from the source
tables.
Page 43 of 75
Case Study
Extracting Data from Assured and country table and populates into Assured
Dimension
PARAMETERS
DESCRIPTION
Sources
Stg_Assured_Detail
It temporarily holds the structured data which has to be loaded in the Assured
Dimension table.
Targets
Dim_Assured
Transformations
Trn_Stg_to_Dim
Page 44 of 75
Case Study
This job fetches the Assured details from the Staging Table. The job loads the data
to the dimension table along with the Surrogate key. In this way the Assured
Dimension is created.
Page 45 of 75
Case Study
Extracting Data From insurer and country table and populates into Insurer
Dimension
PARAMETERS
DESCRIPTION
Sources
Insurer_Detail
Holds the details of the Insurer Table that is fetched from the OLTP
system.
Country_Detail
Control table
Targets
STG_Insurer_Detail
Dim_Insurer
Control_Table
Holds the new dates after the records have been inserted.
In the Control_Table (Target), the Update action is chosen as User-Defined SQL and in the
Enter SQL the following statement is given
UPDATE CONTROL_TABLE SET LAST_EXEC_DATE = ?, CURRENT_EXEC_DATE = ?, T_CODE = ?
WHERE T_CODE='IDIM';
Page 46 of 75
Case Study
Transformations
Trn_to_Stg
Matches the column Country_Code from the Insurer and Country_Detail and
merges all the details.
It performs lookup with the dates obtained from Control_table and then inserts
the records to the Staging Table.
Page 47 of 75
Case Study
Transformations
Trn_Dim_Insurer
This job captures the Insurer details from the OLTP system. It matches and merges the
data from the Country table and puts the data temporarily into the Staging table. After
that the job loads the data to the Dimension table along with the Surrogate key. In this
way the Insurer Dimension is created.
Page 48 of 75
Case Study
PARAMETERS
DESCRIPTION
Sources
Stg_Broker_Details
Targets
Dim_Broker
Page 49 of 75
Case Study
Transformations
Trn_Stg_to_Dim
This job fetches the Broker details from the OLTP system. It matches and
merges the data from the Country table and puts the data temporarily into
the staging table. After that the job loads the data to the dimension table
along with the Surrogate key. In this way the Broker Dimension is created.
Page 50 of 75
Case Study
PARAMETERS
DESCRIPTION
Sources
Risk_Coverage Table
Targets
Dim_Risk_Coverage
Transformations
Trn_Risk_Coverage
In the transformation a Surrogate key (RISK_KEY) is generated and also has the
details of the date on which the record has been inserted i.e., Current date
The Transformation looks like :
Page 51 of 75
Case Study
This Job loads the data for Risk Coverage Dimension table.
7.2.5. Dimension table for Claim Rejection
Page 52 of 75
PARAMETERS
Case Study
DESCRIPTION
Sources
Claim_Rejection Table
Targets
Dim_Claim_Rejection
Transformations
Trn_Claim_Rejection
Page 53 of 75
Case Study
PARAMETERS
DESCRIPTION
Sources
Claim_Reason Table
Targets
Dim_Claim_Reason
Transformations
Trn_Claim_Reason
Page 54 of 75
Case Study
Page 55 of 75
Case Study
Extracting Data from Time.txt file and populates into Time Dimension
PARAMETERS
DESCRIPTION
Sources
Time_Txt
A text file that contains one column of dates, in the format yyyy-mm-dd.
Targets
Dim_Date
Table that has seven columns containing each date and its corresponding month,
quarter, week, day of the month and year alongwith the time_key
Transformations
Trn_Date
Page 56 of 75
Case Study
This Job loads the time dimension table, in the data mart. The time dimension
table contains many rows of dates, and almost always has additional columns to
allow grouping of events by broader date ranges.
Once this is accomplished, the time dimension allows to quickly group data by
month, quarter or year, which is useful for reporting, and much more efficient
than selecting every date individually, or using an expression of greater than one
date and less than another.
Page 57 of 75
Case Study
PARAMETERS
DESCRIPTION
Sources
Currency Table
It has details about the Currency code and the Currency Name
Country Table
It has the country details along with the country Currency Code
Targets
Dim_Currency
Transformations
Trn_Dim_Currency
Page 58 of 75
Case Study
This job loads the data into the Dim_Currency Dimension. A surrogate key
(Currency_key) is generated and the column Inserted On is the date on which the
ecord has been inserted i.e., the Current Date
The transformation matches the Country_Currency of the country table and
Currency_Code of the currency table and loads the data into the dimension table
(i.e, Dim_Currency)
Page 59 of 75
Case Study
Extracting data from paid_by txt file/database and loading into Paid_by
dimension
PARAMETERS
DESCRIPTION
Sources
Paid_By
ODBC table that contains paid_by code and its respective description (it
is paid by cash /cheque or DD).
Targets
Dim_Paid_By
It holds the Paid_by details along with the Paid_by_key and the
information of when it was paid.
Transformations
Trn_Paid_By
Page 60 of 75
Case Study
This job loads the data into the Dim_Paid_By Dimension. A surrogate key
(Paid_By_key) is generated and the column Inserted On is the date on which the
record has been inserted i.e., the Current Date
This job loads the Paid_by Dimension table and gives the information of how and
when the Claim / Premium have been paid. It holds the details of how the
payment has been made i.e whether it is paid by cash/cheque or DD
Page 61 of 75
Case Study
Extracting data from Premium Type text file/Database and load into
Premium_Type
PARAMETERS
DESCRIPTION
Sources
Premium_type Table
Targets
Dim_Premium_Type
It holds the details of the premium along with the premium key and the
details of when it was inserted
Transformations
Trn_to_Dim
Page 62 of 75
Case Study
This job loads the data into the Dim_Premium Dimension. A surrogate key
(Premium_key) is generated and the column Inserted On is the date on which the
record has been inserted i.e., the Current Date
This job loads the data into the Dim_Premium Dimension. Premium types can be
Quarterly / Half Yearly / Yearly (Annual)
Page 63 of 75
Case Study
PARAMETERS
DESCRIPTION
Sources
Dim_Time
Dim_Insurer
Dim_Broker
Dim_Assured
Stg_Policy_Detail
Targets
Signing_Status_fact
Reject_Fact_Signing_Status
Page 64 of 75
Case Study
Transformations
Used to load the data to the Fact table for Signing Status.
Trn_Dim_to_Fact
This job verifies those records which are matching with all condition will be loaded into
signing fact table. The records which are not matching such if any of the key holds null
value , date is not matching etc will be loaded into rejected signing fact table.
Trn_Dim_to_Fact
PARAMETERS
DESCRIPTION
Sources
Dim_Time
Dim_Insurer
Dim_Broker
Dim_Assured
Dim_Currency
Page 65 of 75
Dim_Premium
Stg_Premium_Detail
Case Study
Targets
Fact_Premium
Transformations
Trn_to_Stg
Used to load the data to the Aggregator from where we load it into the Premium Fact.
The aggregator is used to Aggregate the Premium Amount. The Aggregator should look like
this :
Page 66 of 75
Case Study
Page 67 of 75
Case Study
PARAMETERS
DESCRIPTION
Sources
Dim_Time
Dim_Insurer
Dim_Broker
Dim_Assured
Dim_Currency
Dim_Risk_coverage
Dim_Claim_reason
Stg_Claim_Detail
A table that temporarily holds the structured data that is obtained from the
source tables.
Page 68 of 75
Case Study
Targets
Stg_Premium_detail
A table that temporarily holds the structured data that is obtained from the
source tables.
Transformations
Trn_Fact_Claim
Aggregator
Page 69 of 75
Case Study
Page 70 of 75
Case Study
PARAMETERS
DESCRIPTION
Job_Dim_Insurer
Job_Dim_Broker
Job_Dim_Assured
Job_Dim_Currency
Job_Paid_by
This job executes to load how payment has made ie. either
Cheque/DD/Cash
Job_Premium_Type
Job_loading_Premium_Fact
Sequencer jobs
Sequencer
Page 71 of 75
Case Study
Job Terminator
PARAMETERS
DESCRIPTION
Job_Dim_Insurer
Job_Dim_Broker
Job_Dim_Assured
Job_Stg_Policy_Detail
Page 72 of 75
Job_Signing_Status_fact
Case Study
Sequencer jobs
Sequencer
Sequencer
Job Notification
activity
Job Notification
activity
Job Terminator
Page 73 of 75
PARAMETERS
Case Study
DESCRIPTION
Job_Dim_Insurer
Job_Dim_Broker
Job_Dim_Assured
Job_Claim_Detail
This job executes to hold details information related to claim how and
when claim has made. Also holds reason for claim.
Sequencer jobs
Job Terminator
Sequencer
Sequencer
Job Notification activity
Page 74 of 75
Case Study
PARAMETERS
DESCRIPTION
Job activities
Premium_Fact
Signing_Fact
Claim_Fact
Page 75 of 75