Fact table granulartity to small or just built wrong
2 posters
Page 1 of 1
Fact table granulartity to small or just built wrong
I have a fact table thats starting to get out of hand and I'm wondering if its that granularity or the table is just built wrong. The fact table stores our award information and awards are stored in years. The award has a start date and and end date. So instead of putting the start date and end date in the fact table (referencing the dimension table for dates) they (the developers) have stored every single month in the fact table. My solution was to store the start_date and end_date only and use date calculations for reporting.
So an award will have the following structure in the fact table: All this data is duplicate except for the DATE_KEY.
CREATE TABLE FACT_1
(
AWARD_KEY NUMBER(38),
DATE_KEY INTEGER,
PROJECT_PERIOD_BEGIN_KEY INTEGER,
PROJECT_PERIOD_END_KEY INTEGER,
BUDGET_PERIOD_BEGIN_KEY INTEGER,
BUDGET_PERIOD_END_KEY INTEGER,
PRIMARY_INVESTIGATOR_KEY NUMBER(38),
CO_INVESTIGATOR_KEY NUMBER(38),
AWARD_TYPE_KEY NUMBER(38),
ACCOUNT_KEY INTEGER,
DIVISION_SUB_KEY NUMBER(38),
DIVISION_MASTER_KEY NUMBER(38),
DIRECT_BUDGET_AMT NUMBER,
INDIRECT_BUDGET_AMT NUMBER,
CHANGED_DATE DATE,
MAIN_SPONSOR_KEY NUMBER(38),
AWARD_BUDGET_KEY NUMBER(10),
PRIME_SPONSOR_KEY NUMBER(38),
IS_MASTER CHAR(1 BYTE),
CR_CUT_PERCENTAGE NUMBER(10,2),
IS_EAR CHAR(1 BYTE),
NO_COST_EXTENSION NUMBER(10),
PRE_AWARD_DATE DATE,
IS_CR_CUT CHAR(1 BYTE),
FA_RATE VARCHAR2(5 BYTE)
)
SET DEFINE OFF;
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781620, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781621, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781622, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into RS_WAREHOUSE.TRANS_FCT_LOOKUP4
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781623, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781624, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781625, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781628, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781629, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781630, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781631, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
COMMIT;
So an award will have the following structure in the fact table: All this data is duplicate except for the DATE_KEY.
CREATE TABLE FACT_1
(
AWARD_KEY NUMBER(38),
DATE_KEY INTEGER,
PROJECT_PERIOD_BEGIN_KEY INTEGER,
PROJECT_PERIOD_END_KEY INTEGER,
BUDGET_PERIOD_BEGIN_KEY INTEGER,
BUDGET_PERIOD_END_KEY INTEGER,
PRIMARY_INVESTIGATOR_KEY NUMBER(38),
CO_INVESTIGATOR_KEY NUMBER(38),
AWARD_TYPE_KEY NUMBER(38),
ACCOUNT_KEY INTEGER,
DIVISION_SUB_KEY NUMBER(38),
DIVISION_MASTER_KEY NUMBER(38),
DIRECT_BUDGET_AMT NUMBER,
INDIRECT_BUDGET_AMT NUMBER,
CHANGED_DATE DATE,
MAIN_SPONSOR_KEY NUMBER(38),
AWARD_BUDGET_KEY NUMBER(10),
PRIME_SPONSOR_KEY NUMBER(38),
IS_MASTER CHAR(1 BYTE),
CR_CUT_PERCENTAGE NUMBER(10,2),
IS_EAR CHAR(1 BYTE),
NO_COST_EXTENSION NUMBER(10),
PRE_AWARD_DATE DATE,
IS_CR_CUT CHAR(1 BYTE),
FA_RATE VARCHAR2(5 BYTE)
)
SET DEFINE OFF;
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781620, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781621, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781622, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into RS_WAREHOUSE.TRANS_FCT_LOOKUP4
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781623, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781624, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781625, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781628, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781629, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781630, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
Insert into FACT_1
(AWARD_KEY, DATE_KEY, PROJECT_PERIOD_BEGIN_KEY, PROJECT_PERIOD_END_KEY, BUDGET_PERIOD_BEGIN_KEY,
BUDGET_PERIOD_END_KEY, PRIMARY_INVESTIGATOR_KEY, CO_INVESTIGATOR_KEY, AWARD_TYPE_KEY, ACCOUNT_KEY,
DIVISION_SUB_KEY, DIVISION_MASTER_KEY, DIRECT_BUDGET_AMT, INDIRECT_BUDGET_AMT, CHANGED_DATE,
MAIN_SPONSOR_KEY, AWARD_BUDGET_KEY, IS_MASTER, IS_EAR, NO_COST_EXTENSION,
IS_CR_CUT, FA_RATE)
Values
(253392309, 594781631, 594781233, 594780806, 594780199,
594781635, 253587533, 253587533, 594765981, 594744391,
594809096, 594809096, 483.068493150685, 205.586301369863, TO_DATE('06/18/2015 00:32:26', 'MM/DD/YYYY HH24:MI:SS'),
253606914, 595123047, 'Y', 'N', 2,
'N', '48.5');
COMMIT;
dantolz- Posts : 2
Join date : 2015-06-18
Too many rows
We are over 30 million rows right now and growing. I know, its a warehouse right but the design seems wrong to me and I'm wondering if a fact table can "in fact" have so much duplicate data.
dantolz- Posts : 2
Join date : 2015-06-18
Re: Fact table granulartity to small or just built wrong
Either model will work. Wither the change will create more complexity depends on the types of queries that are performed.
Similar topics
» Integrating new fact table which has one to many relationship with the main fact table in existing star schema
» Very Small Dimension Table
» Painted into a healthcare DW "digital corner" -- or is it wrong to have keys and attributes in a single table
» Get Subdimension (outrigger) count (built using Bridge Table)
» 'Routing' the grain of the fact table to multpile members of multiple dimensions causes the fact table to 'explode'
» Very Small Dimension Table
» Painted into a healthcare DW "digital corner" -- or is it wrong to have keys and attributes in a single table
» Get Subdimension (outrigger) count (built using Bridge Table)
» 'Routing' the grain of the fact table to multpile members of multiple dimensions causes the fact table to 'explode'
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum