-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdw.php
54 lines (32 loc) · 1.75 KB
/
dw.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/*****************************************************************************************************************
Created By : Cormac McGuire - cromac
Created Date : 01/05/2011
Description : Transform the data from the etl tables to the star schema
Updated By :
Updated Date :
Description :
*****************************************************************************************************************/
$dw_classes = array( 'createdwtables', 'hierarchy', 'dimension_upload', 'fact_upload' );
foreach ( $dw_classes as $class ){
$file = 'classes/dw/class.' . $class . '.php';
include( $file );
}
$verbose = true;
$dw_table_creator = new CreateDwTables( $verbose );
$hierarchy = new ManagerHierarchy( $verbose );
$dim_upload = new DimensionUpload( $verbose );
$fact_upload = new FactUpload( $verbose );
/*****************************************************************************************************************
CREATE TABLES
*****************************************************************************************************************/
$dw_table_creator->buildCreateStatements();
/*****************************************************************************************************************
UPLOAD DATA
*****************************************************************************************************************/
$dim_upload->write_to_warehouse();
$fact_upload->write_facts();
/*****************************************************************************************************************
MANAGER HIERARCHY
*****************************************************************************************************************/
$hierarchy->createHierarchy();