function __construct() { $this->setTableName('user'); $this->setCachable(); // properties $this->properties['id'] = new owa_dbColumn(); $this->properties['id']->setDataType(OWA_DTD_SERIAL); $this->properties['id']->setAutoIncrement(); $this->properties['user_id'] = new owa_dbColumn(); $this->properties['user_id']->setDataType(OWA_DTD_VARCHAR255); $this->properties['user_id']->setPrimaryKey(); $this->properties['password'] = new owa_dbColumn(); $this->properties['password']->setDataType(OWA_DTD_VARCHAR255); $this->properties['role'] = new owa_dbColumn(); $this->properties['role']->setDataType(OWA_DTD_VARCHAR255); $this->properties['real_name'] = new owa_dbColumn(); $this->properties['real_name']->setDataType(OWA_DTD_VARCHAR255); $this->properties['email_address'] = new owa_dbColumn(); $this->properties['email_address']->setDataType(OWA_DTD_VARCHAR255); $this->properties['temp_passkey'] = new owa_dbColumn(); $this->properties['temp_passkey']->setDataType(OWA_DTD_VARCHAR255); $this->properties['creation_date'] = new owa_dbColumn(); $this->properties['creation_date']->setDataType(OWA_DTD_BIGINT); $this->properties['last_update_date'] = new owa_dbColumn(); $this->properties['last_update_date']->setDataType(OWA_DTD_BIGINT); $apiKey = new owa_dbColumn(); $apiKey->setName('api_key'); $apiKey->setDataType(OWA_DTD_VARCHAR255); $this->setProperty($apiKey); }
function __construct() { $this->setTableName('visitor'); $this->setCachable(); // properties $this->properties['id'] = new owa_dbColumn(); $this->properties['id']->setDataType(OWA_DTD_BIGINT); $this->properties['id']->setPrimaryKey(); //drop $this->properties['user_name'] = new owa_dbColumn(); $this->properties['user_name']->setDataType(OWA_DTD_VARCHAR255); //drop $this->properties['user_email'] = new owa_dbColumn(); $this->properties['user_email']->setDataType(OWA_DTD_VARCHAR255); $this->properties['first_session_id'] = new owa_dbColumn(); $this->properties['first_session_id']->setDataType(OWA_DTD_BIGINT); $this->properties['first_session_year'] = new owa_dbColumn(); $this->properties['first_session_year']->setDataType(OWA_DTD_INT); $this->properties['first_session_month'] = new owa_dbColumn(); $this->properties['first_session_month']->setDataType(OWA_DTD_VARCHAR255); $this->properties['first_session_day'] = new owa_dbColumn(); $this->properties['first_session_day']->setDataType(OWA_DTD_INT); $this->properties['first_session_dayofyear'] = new owa_dbColumn(); $this->properties['first_session_dayofyear']->setDataType(OWA_DTD_INT); $this->properties['first_session_timestamp'] = new owa_dbColumn(); $this->properties['first_session_timestamp']->setDataType(OWA_DTD_BIGINT); $this->properties['first_session_yyyymmdd'] = new owa_dbColumn(); $this->properties['first_session_yyyymmdd']->setDataType(OWA_DTD_BIGINT); $this->properties['last_session_id'] = new owa_dbColumn(); $this->properties['last_session_id']->setDataType(OWA_DTD_BIGINT); $this->properties['last_session_year'] = new owa_dbColumn(); $this->properties['last_session_year']->setDataType(OWA_DTD_INT); $this->properties['last_session_month'] = new owa_dbColumn(); $this->properties['last_session_month']->setDataType(OWA_DTD_VARCHAR255); $this->properties['last_session_day'] = new owa_dbColumn(); $this->properties['last_session_day']->setDataType(OWA_DTD_INT); $this->properties['last_session_dayofyear'] = new owa_dbColumn(); $this->properties['last_session_dayofyear']->setDataType(OWA_DTD_INT); //drop $num_prior_sessions = new owa_dbColumn(); $num_prior_sessions->setName('num_prior_sessions'); $num_prior_sessions->setDataType(OWA_DTD_INT); $this->setProperty($num_prior_sessions); }
function __construct() { $this->setTableName('domstream'); // set common fact table columns $parent_columns = parent::__construct(); foreach ($parent_columns as $pcolumn) { $this->setProperty($pcolumn); } // move to abstract //$this->properties['id'] = new owa_dbColumn; //$this->properties['id']->setDataType(OWA_DTD_BIGINT); //$this->properties['id']->setPrimaryKey(); // move to abstract //$visitor_id = new owa_dbColumn('visitor_id', OWA_DTD_BIGINT); //$visitor_id->setForeignKey('base.visitor'); //$this->setProperty($visitor_id); // move to abstract //$session_id = new owa_dbColumn('session_id', OWA_DTD_BIGINT); //$session_id->setForeignKey('base.session'); //$this->setProperty($session_id); $document_id = new owa_dbColumn('document_id', OWA_DTD_BIGINT); $document_id->setForeignKey('base.document'); $this->setProperty($document_id); // move to abstract //$site_id = new owa_dbColumn('site_id', OWA_DTD_VARCHAR255); //$site_id->setForeignKey('base.site', 'site_id'); //$this->setProperty($site_id); $domstream_guid = new owa_dbColumn('domstream_guid', OWA_DTD_BIGINT); $this->setProperty($domstream_guid); $this->properties['events'] = new owa_dbColumn(); $this->properties['events']->setDataType(OWA_DTD_BLOB); $this->properties['duration'] = new owa_dbColumn(); $this->properties['duration']->setDataType(OWA_DTD_INT); // move to abstract //$this->properties['timestamp'] = new owa_dbColumn; //$this->properties['timestamp']->setDataType(OWA_DTD_INT); // move to abstract //$this->properties['yyyymmdd'] = new owa_dbColumn; //$this->properties['yyyymmdd']->setDataType(OWA_DTD_INT); // needed? $this->properties['page_url'] = new owa_dbColumn(); $this->properties['page_url']->setDataType(OWA_DTD_VARCHAR255); }
function __construct() { $this->setTableName('action_fact'); // set common fact table columns $parent_columns = parent::__construct(); foreach ($parent_columns as $pcolumn) { $this->setProperty($pcolumn); } $document_id = new owa_dbColumn('document_id', OWA_DTD_BIGINT); $document_id->setForeignKey('base.document'); $this->setProperty($document_id); $action_name = new owa_dbColumn('action_name', OWA_DTD_VARCHAR255); $this->setProperty($action_name); $action_label = new owa_dbColumn('action_label', OWA_DTD_VARCHAR255); $this->setProperty($action_label); $action_group = new owa_dbColumn('action_group', OWA_DTD_VARCHAR255); $this->setProperty($action_group); $numeric_value = new owa_dbColumn('numeric_value', OWA_DTD_INT); $this->setProperty($numeric_value); }
function __construct() { $this->setTableName('queue_item'); //$this->setCachable(); // properties $id = new owa_dbColumn('id', OWA_DTD_BIGINT); $id->setPrimaryKey(); $this->setProperty($id); $event_type = new owa_dbColumn('event_type', OWA_DTD_VARCHAR255); $this->setProperty($event_type); $priority = new owa_dbColumn('priority', OWA_DTD_INT); $this->setProperty($priority); $status = new owa_dbColumn('status', OWA_DTD_VARCHAR255); $this->setProperty($status); $event = new owa_dbColumn('event', OWA_DTD_BLOB); $this->setProperty($event); $insertion_datestamp = new owa_dbColumn('insertion_datestamp', OWA_DTD_TIMESTAMP); $this->setProperty($insertion_datestamp); $insertion_timestamp = new owa_dbColumn('insertion_timestamp', OWA_DTD_INT); $this->setProperty($insertion_timestamp); $handled_timestamp = new owa_dbColumn('handled_timestamp', OWA_DTD_INT); $this->setProperty($handled_timestamp); $last_attempt_timestamp = new owa_dbColumn('last_attempt_timestamp', OWA_DTD_INT); $this->setProperty($last_attempt_timestamp); $not_before_timestamp = new owa_dbColumn('not_before_timestamp', OWA_DTD_INT); $this->setProperty($not_before_timestamp); $failed_attempt_count = new owa_dbColumn('failed_attempt_count', OWA_DTD_INT); $this->setProperty($failed_attempt_count); $is_assigned = new owa_dbColumn('is_assigned', OWA_DTD_BOOLEAN); $this->setProperty($is_assigned); $last_error_msg = new owa_dbColumn('last_error_msg', OWA_DTD_VARCHAR255); $this->setProperty($last_error_msg); $handled_by = new owa_dbColumn('handled_by', OWA_DTD_VARCHAR255); $this->setProperty($handled_by); $handler_duration = new owa_dbColumn('handler_duration', OWA_DTD_INT); $this->setProperty($handler_duration); }
function __construct() { $this->setTableName('click'); // set common fact table columns $parent_columns = parent::__construct(); foreach ($parent_columns as $pcolumn) { $this->setProperty($pcolumn); } // move to abstract //$this->properties['id'] = new owa_dbColumn; //$this->properties['id']->setDataType(OWA_DTD_BIGINT); //$this->properties['id']->setPrimaryKey(); // drop $this->properties['last_impression_id'] = new owa_dbColumn(); $this->properties['last_impression_id']->setDataType(OWA_DTD_BIGINT); // move to abstract //$visitor_id = new owa_dbColumn('visitor_id', OWA_DTD_BIGINT); //$visitor_id->setForeignKey('base.visitor'); //$this->setProperty($visitor_id); // move to abstract //$session_id = new owa_dbColumn('session_id', OWA_DTD_BIGINT); //$session_id->setForeignKey('base.session'); //$this->setProperty($session_id); $document_id = new owa_dbColumn('document_id', OWA_DTD_BIGINT); $document_id->setForeignKey('base.document'); $this->setProperty($document_id); $this->properties['target_id'] = new owa_dbColumn(); $this->properties['target_id']->setDataType(OWA_DTD_BIGINT); $this->properties['target_url'] = new owa_dbColumn(); $this->properties['target_url']->setDataType(OWA_DTD_VARCHAR255); // move to abstract //$this->properties['timestamp'] = new owa_dbColumn; //$this->properties['timestamp']->setDataType(OWA_DTD_INT); /* $this->properties['year'] = new owa_dbColumn; $this->properties['year']->setDataType(OWA_DTD_INT); $this->properties['month'] = new owa_dbColumn; $this->properties['month']->setDataType(OWA_DTD_INT); $this->properties['day'] = new owa_dbColumn; $this->properties['day']->setDataType(OWA_DTD_INT); $this->properties['dayofyear'] = new owa_dbColumn; $this->properties['dayofyear']->setDataType(OWA_DTD_INT); $this->properties['weekofyear'] = new owa_dbColumn; $this->properties['weekofyear']->setDataType(OWA_DTD_INT); */ // drop these soon $this->properties['hour'] = new owa_dbColumn(); $this->properties['hour']->setDataType(OWA_DTD_TINYINT2); $this->properties['minute'] = new owa_dbColumn(); $this->properties['minute']->setDataType(OWA_DTD_TINYINT2); $this->properties['second'] = new owa_dbColumn(); $this->properties['second']->setDataType(OWA_DTD_INT); $this->properties['msec'] = new owa_dbColumn(); $this->properties['msec']->setDataType(OWA_DTD_VARCHAR255); $this->properties['click_x'] = new owa_dbColumn(); $this->properties['click_x']->setDataType(OWA_DTD_INT); $this->properties['click_y'] = new owa_dbColumn(); $this->properties['click_y']->setDataType(OWA_DTD_INT); $this->properties['page_width'] = new owa_dbColumn(); $this->properties['page_width']->setDataType(OWA_DTD_INT); $this->properties['page_height'] = new owa_dbColumn(); $this->properties['page_height']->setDataType(OWA_DTD_INT); $this->properties['position'] = new owa_dbColumn(); $this->properties['position']->setDataType(OWA_DTD_INT); $this->properties['approx_position'] = new owa_dbColumn(); $this->properties['approx_position']->setDataType(OWA_DTD_BIGINT); $this->properties['dom_element_x'] = new owa_dbColumn(); $this->properties['dom_element_x']->setDataType(OWA_DTD_INT); $this->properties['dom_element_y'] = new owa_dbColumn(); $this->properties['dom_element_y']->setDataType(OWA_DTD_INT); $this->properties['dom_element_name'] = new owa_dbColumn(); $this->properties['dom_element_name']->setDataType(OWA_DTD_VARCHAR255); $this->properties['dom_element_id'] = new owa_dbColumn(); $this->properties['dom_element_id']->setDataType(OWA_DTD_VARCHAR255); $this->properties['dom_element_value'] = new owa_dbColumn(); $this->properties['dom_element_value']->setDataType(OWA_DTD_VARCHAR255); $this->properties['dom_element_tag'] = new owa_dbColumn(); $this->properties['dom_element_tag']->setDataType(OWA_DTD_VARCHAR255); $this->properties['dom_element_text'] = new owa_dbColumn(); $this->properties['dom_element_text']->setDataType(OWA_DTD_VARCHAR255); $this->properties['dom_element_class'] = new owa_dbColumn(); $this->properties['dom_element_class']->setDataType(OWA_DTD_VARCHAR255); $this->properties['dom_element_parent_id'] = new owa_dbColumn(); $this->properties['dom_element_parent_id']->setDataType(OWA_DTD_VARCHAR255); // drop $this->properties['tag_id'] = new owa_dbColumn(); $this->properties['tag_id']->setDataType(OWA_DTD_BIGINT); //drop $this->properties['placement_id'] = new owa_dbColumn(); $this->properties['placement_id']->setDataType(OWA_DTD_BIGINT); // move to abstract //$this->properties['campaign_id'] = new owa_dbColumn; //$this->properties['campaign_id']->setDataType(OWA_DTD_BIGINT); //drop $this->properties['ad_group_id'] = new owa_dbColumn(); $this->properties['ad_group_id']->setDataType(OWA_DTD_BIGINT); // move to abstract //$this->properties['ad_id'] = new owa_dbColumn; //$this->properties['ad_id']->setDataType(OWA_DTD_BIGINT); // move to absctract //$site_id = new owa_dbColumn('site_id', OWA_DTD_VARCHAR255); //$site_id->setForeignKey('base.site', 'site_id'); //$this->setProperty($site_id); // move to absctract //$ua_id = new owa_dbColumn('ua_id', OWA_DTD_BIGINT); //$ua_id->setForeignKey('base.ua'); //$this->setProperty($ua_id); // move to abstract //$this->properties['ip_address'] = new owa_dbColumn; //$this->properties['ip_address']->setDataType(OWA_DTD_VARCHAR255); // drop $this->properties['host'] = new owa_dbColumn(); $this->properties['host']->setDataType(OWA_DTD_VARCHAR255); // move to abstract //wrong data type //$host_id = new owa_dbColumn('host_id', OWA_DTD_VARCHAR255); //$host_id->setForeignKey('base.host'); //$this->setProperty($host_id); // move to abstract //$yyyymmdd = new owa_dbColumn; //$yyyymmdd->setName('yyyymmdd'); //$yyyymmdd->setDataType(OWA_DTD_INT); //$yyyymmdd->setIndex(); //$this->setProperty($yyyymmdd); }
function __construct() { $this->setTableName('commerce_transaction_fact'); // set common fact table columns $parent_columns = parent::__construct(); foreach ($parent_columns as $pcolumn) { $this->setProperty($pcolumn); } // move to abstract //$id = new owa_dbColumn('id', OWA_DTD_BIGINT); //$id->setPrimaryKey(); //$this->setProperty($id); // move to abstract //$visitor_id = new owa_dbColumn('visitor_id', OWA_DTD_BIGINT); //$visitor_id->setForeignKey('base.visitor'); //$this->setProperty($visitor_id); // move to abstract //$session_id = new owa_dbColumn('session_id', OWA_DTD_BIGINT); //$session_id->setForeignKey('base.session'); //$this->setProperty($session_id); $document_id = new owa_dbColumn('document_id', OWA_DTD_BIGINT); $document_id->setForeignKey('base.document'); $this->setProperty($document_id); // move to abstract //$site_id = new owa_dbColumn('site_id', OWA_DTD_VARCHAR255); //$site_id->setForeignKey('base.site', 'site_id'); //$this->setProperty($site_id); // move to abstract //$ua_id = new owa_dbColumn('ua_id', OWA_DTD_BIGINT); //$ua_id->setForeignKey('base.ua'); //$this->setProperty($ua_id); // move to abstract //$host_id = new owa_dbColumn('host_id', OWA_DTD_BIGINT); //$host_id->setForeignKey('base.host'); //$this->setProperty($host_id); // move to abstract //$os_id = new owa_dbColumn('os_id', OWA_DTD_BIGINT); //$os_id->setForeignKey('base.os'); //$this->setProperty($os_id); // move to abstract //$location_id = new owa_dbColumn('location_id', OWA_DTD_BIGINT); //$location_id->setForeignKey('base.location_dim'); //$this->setProperty($location_id); // move to abstract //$medium = new owa_dbColumn('medium',OWA_DTD_VARCHAR255); //$this->setProperty($medium); // move to abstract //$source_id = new owa_dbColumn('source_id', OWA_DTD_BIGINT); //$source_id->setForeignKey('base.source_dim'); //$this->setProperty($source_id); // move to abstract //$ad_id = new owa_dbColumn('ad_id', OWA_DTD_BIGINT); //$ad_id->setForeignKey('base.ad_dim'); //$this->setProperty($ad_id); // move to abstract //$campaign_id = new owa_dbColumn('campaign_id', OWA_DTD_BIGINT); //$campaign_id->setForeignKey('base.campaign_dim'); //$this->setProperty($campaign_id); // move to abstract //$referring_search_term_id = new owa_dbColumn('referring_search_term_id', OWA_DTD_BIGINT); //$referring_search_term_id->setForeignKey('base.search_term_dim'); //$this->setProperty($referring_search_term_id); // move to abstract //$referer_id = new owa_dbColumn('referer_id', OWA_DTD_BIGINT); //$referer_id->setForeignKey('base.referer'); //$this->setProperty($referer_id); // move to abstract //$timestamp = new owa_dbColumn('timestamp', OWA_DTD_INT); //$this->setProperty($timestamp); // move to abstract //$yyyymmdd = new owa_dbColumn('yyyymmdd', OWA_DTD_INT); //$this->setProperty($yyyymmdd); $order_id = new owa_dbColumn('order_id', OWA_DTD_VARCHAR255); $order_id->setIndex(); $this->setProperty($order_id); $order_source = new owa_dbColumn('order_source', OWA_DTD_VARCHAR255); $this->setProperty($order_source); $gateway = new owa_dbColumn('gateway', OWA_DTD_VARCHAR255); $this->setProperty($gateway); $total = new owa_dbColumn('total_revenue', OWA_DTD_BIGINT); $this->setProperty($total); $tax = new owa_dbColumn('tax_revenue', OWA_DTD_BIGINT); $this->setProperty($tax); $shipping = new owa_dbColumn('shipping_revenue', OWA_DTD_BIGINT); $this->setProperty($shipping); // move to abstract //$days_since_first_session = new owa_dbColumn('days_since_first_session', OWA_DTD_INT); //$this->setProperty($days_since_first_session); // move to abstract //$nps = new owa_dbColumn('num_prior_sessions', OWA_DTD_INT); //$this->setProperty($nps); }
function __construct() { $this->setTableName('feed_request'); // properties $this->properties['id'] = new owa_dbColumn(); $this->properties['id']->setDataType(OWA_DTD_BIGINT); $this->properties['id']->setPrimaryKey(); $visitor_id = new owa_dbColumn('visitor_id', OWA_DTD_BIGINT); $visitor_id->setForeignKey('base.visitor'); $this->setProperty($visitor_id); $session_id = new owa_dbColumn('session_id', OWA_DTD_BIGINT); $session_id->setForeignKey('base.session'); $this->setProperty($session_id); $document_id = new owa_dbColumn('document_id', OWA_DTD_BIGINT); $document_id->setForeignKey('base.document'); $this->setProperty($document_id); $site_id = new owa_dbColumn('site_id', OWA_DTD_VARCHAR255); $site_id->setForeignKey('base.site', 'site_id'); $this->setProperty($site_id); // wrong data type $ua_id = new owa_dbColumn('ua_id', OWA_DTD_VARCHAR255); $ua_id->setForeignKey('base.ua'); $this->setProperty($ua_id); $host_id = new owa_dbColumn('host_id', OWA_DTD_BIGINT); $host_id->setForeignKey('base.host'); $this->setProperty($host_id); // wrong data type $os_id = new owa_dbColumn('os_id', OWA_DTD_VARCHAR255); $os_id->setForeignKey('base.os'); $this->setProperty($os_id); //drop $this->properties['site'] = new owa_dbColumn(); $this->properties['site']->setDataType(OWA_DTD_VARCHAR255); //drop $this->properties['host'] = new owa_dbColumn(); $this->properties['host']->setDataType(OWA_DTD_VARCHAR255); $this->properties['feed_reader_guid'] = new owa_dbColumn(); $this->properties['feed_reader_guid']->setDataType(OWA_DTD_VARCHAR255); $this->properties['subscription_id'] = new owa_dbColumn(); $this->properties['subscription_id']->setDataType(OWA_DTD_BIGINT); $this->properties['timestamp'] = new owa_dbColumn(); $this->properties['timestamp']->setDataType(OWA_DTD_BIGINT); $yyyymmdd = new owa_dbColumn(); $yyyymmdd->setName('yyyymmdd'); $yyyymmdd->setDataType(OWA_DTD_INT); $yyyymmdd->setIndex(); $this->setProperty($yyyymmdd); $this->properties['month'] = new owa_dbColumn(); $this->properties['month']->setDataType(OWA_DTD_INT); $this->properties['day'] = new owa_dbColumn(); $this->properties['day']->setDataType(OWA_DTD_TINYINT2); $this->properties['dayofweek'] = new owa_dbColumn(); $this->properties['dayofweek']->setDataType(OWA_DTD_VARCHAR10); $this->properties['dayofyear'] = new owa_dbColumn(); $this->properties['dayofyear']->setDataType(OWA_DTD_INT); $this->properties['weekofyear'] = new owa_dbColumn(); $this->properties['weekofyear']->setDataType(OWA_DTD_INT); $this->properties['year'] = new owa_dbColumn(); $this->properties['year']->setDataType(OWA_DTD_INT); $this->properties['hour'] = new owa_dbColumn(); $this->properties['hour']->setDataType(OWA_DTD_TINYINT2); $this->properties['minute'] = new owa_dbColumn(); $this->properties['minute']->setDataType(OWA_DTD_TINYINT2); $this->properties['second'] = new owa_dbColumn(); $this->properties['second']->setDataType(OWA_DTD_TINYINT2); $this->properties['msec'] = new owa_dbColumn(); $this->properties['msec']->setDataType(OWA_DTD_INT); $this->properties['last_req'] = new owa_dbColumn(); $this->properties['last_req']->setDataType(OWA_DTD_BIGINT); $this->properties['feed_format'] = new owa_dbColumn(); $this->properties['feed_format']->setDataType(OWA_DTD_VARCHAR255); //drop $this->properties['ip_address'] = new owa_dbColumn(); $this->properties['ip_address']->setDataType(OWA_DTD_VARCHAR255); //drop $this->properties['os'] = new owa_dbColumn(); $this->properties['os']->setDataType(OWA_DTD_VARCHAR255); $yyyymmdd = new owa_dbColumn(); $yyyymmdd->setName('yyyymmdd'); $yyyymmdd->setDataType(OWA_DTD_INT); $yyyymmdd->setIndex(); $this->setProperty($yyyymmdd); }
function __construct() { // table name $this->setTableName('session'); $this->setSummaryLevel(1); // set common fact table columns $parent_columns = parent::__construct(); // remove the session id from parent col list // as it's a duplicate to the id column for this entity. if (isset($parent_columns['session_id'])) { unset($parent_columns['session_id']); } foreach ($parent_columns as $pcolumn) { $this->setProperty($pcolumn); } // properties // move to abstract //$this->properties['id'] = new owa_dbColumn; //$this->properties['id']->setDataType(OWA_DTD_BIGINT); //$this->properties['id']->setPrimaryKey(); // move to abstract //$visitor_id = new owa_dbColumn('visitor_id', OWA_DTD_BIGINT); //$visitor_id->setForeignKey('base.visitor'); //$this->setProperty($visitor_id); // move to abstract //$ts = new owa_dbColumn; //$ts->setName('timestamp'); //$ts->setDataType(OWA_DTD_BIGINT); //$ts->setIndex(); //$this->setProperty($ts); // move to abstract //$yyyymmdd = new owa_dbColumn; //$yyyymmdd->setName('yyyymmdd'); //$yyyymmdd->setDataType(OWA_DTD_INT); //$yyyymmdd->setIndex(); //$this->setProperty($yyyymmdd); // move to abstract //$this->properties['user_name'] = new owa_dbColumn; //$this->properties['user_name']->setDataType(OWA_DTD_VARCHAR255); // drop $this->properties['user_email'] = new owa_dbColumn(); $this->properties['user_email']->setDataType(OWA_DTD_VARCHAR255); // move to abstract /* $this->properties['year'] = new owa_dbColumn; $this->properties['year']->setDataType(OWA_DTD_INT); $this->properties['month'] = new owa_dbColumn; $this->properties['month']->setDataType(OWA_DTD_INT); $this->properties['day'] = new owa_dbColumn; $this->properties['day']->setDataType(OWA_DTD_TINYINT2); $this->properties['dayofweek'] = new owa_dbColumn; $this->properties['dayofweek']->setDataType(OWA_DTD_VARCHAR10); $this->properties['dayofyear'] = new owa_dbColumn; $this->properties['dayofyear']->setDataType(OWA_DTD_INT); $this->properties['weekofyear'] = new owa_dbColumn; $this->properties['weekofyear']->setDataType(OWA_DTD_INT); */ // drop these soon $this->properties['hour'] = new owa_dbColumn(); $this->properties['hour']->setDataType(OWA_DTD_TINYINT2); $this->properties['minute'] = new owa_dbColumn(); $this->properties['minute']->setDataType(OWA_DTD_TINYINT2); // move to abstract $this->properties['last_req'] = new owa_dbColumn(); $this->properties['last_req']->setDataType(OWA_DTD_BIGINT); $this->properties['num_pageviews'] = new owa_dbColumn(); $this->properties['num_pageviews']->setDataType(OWA_DTD_INT); // drop $this->properties['num_comments'] = new owa_dbColumn(); $this->properties['num_comments']->setDataType(OWA_DTD_INT); // move to abstract $this->properties['is_repeat_visitor'] = new owa_dbColumn(); $this->properties['is_repeat_visitor']->setDataType(OWA_DTD_TINYINT); // how to denormalize into other fact tables? $is_bounce = new owa_dbColumn(); $is_bounce->setName('is_bounce'); $is_bounce->setDataType(OWA_DTD_TINYINT); $this->setProperty($is_bounce); // move to abstract $this->properties['is_new_visitor'] = new owa_dbColumn(); $this->properties['is_new_visitor']->setDataType(OWA_DTD_TINYINT); // needed? $this->properties['prior_session_lastreq'] = new owa_dbColumn(); $this->properties['prior_session_lastreq']->setDataType(OWA_DTD_BIGINT); // needed? $prior_session_id = new owa_dbColumn('prior_session_id', OWA_DTD_BIGINT); $this->setProperty($prior_session_id); // drop $this->properties['time_sinse_priorsession'] = new owa_dbColumn(); $this->properties['time_sinse_priorsession']->setDataType(OWA_DTD_INT); // drop $this->properties['prior_session_year'] = new owa_dbColumn(); $this->properties['prior_session_year']->setDataType(OWA_DTD_TINYINT4); // drop $this->properties['prior_session_month'] = new owa_dbColumn(); $this->properties['prior_session_month']->setDataType(OWA_DTD_VARCHAR255); // drop $this->properties['prior_session_day'] = new owa_dbColumn(); $this->properties['prior_session_day']->setDataType(OWA_DTD_TINYINT2); // drop $this->properties['prior_session_dayofweek'] = new owa_dbColumn(); $this->properties['prior_session_dayofweek']->setDataType(OWA_DTD_INT); // drop $this->properties['prior_session_hour'] = new owa_dbColumn(); $this->properties['prior_session_hour']->setDataType(OWA_DTD_TINYINT2); // drop $this->properties['prior_session_minute'] = new owa_dbColumn(); $this->properties['prior_session_minute']->setDataType(OWA_DTD_TINYINT2); // move to abstract //$this->properties['days_since_prior_session'] = new owa_dbColumn; //$this->properties['days_since_prior_session']->setDataType(OWA_DTD_INT); // move to abstract //$this->properties['days_since_first_session'] = new owa_dbColumn; //$this->properties['days_since_first_session']->setDataType(OWA_DTD_INT); // drop $this->properties['os'] = new owa_dbColumn(); $this->properties['os']->setDataType(OWA_DTD_VARCHAR255); // wrong data type // move to abstract // $os_id = new owa_dbColumn('os_id', OWA_DTD_VARCHAR255); // $os_id->setForeignKey('base.os'); // $this->setProperty($os_id); // wrong data type // move to abstract //$ua_id = new owa_dbColumn('ua_id', OWA_DTD_VARCHAR255); //$ua_id->setForeignKey('base.ua'); //$this->setProperty($ua_id); $first_page_id = new owa_dbColumn('first_page_id', OWA_DTD_BIGINT); $first_page_id->setForeignKey('base.document'); $this->setProperty($first_page_id); $last_page_id = new owa_dbColumn('last_page_id', OWA_DTD_BIGINT); $last_page_id->setForeignKey('base.document'); $this->setProperty($last_page_id); // move to abstract //$referer_id = new owa_dbColumn('referer_id', OWA_DTD_BIGINT); //$referer_id->setForeignKey('base.referer'); //$this->setProperty($referer_id); // move to abstract //$referring_search_term_id = new owa_dbColumn('referring_search_term_id', OWA_DTD_BIGINT); //$referring_search_term_id->setForeignKey('base.search_term_dim'); //$this->setProperty($referring_search_term_id); // move to abstract //$ip_address = new owa_dbColumn('ip_address', OWA_DTD_VARCHAR255); //$this->setProperty($ip_address); // drop $this->properties['host'] = new owa_dbColumn(); $this->properties['host']->setDataType(OWA_DTD_VARCHAR255); // move to abstract // wrong data type //$host_id = new owa_dbColumn('host_id', OWA_DTD_VARCHAR255); //$host_id->setForeignKey('base.host'); //$this->setProperty($host_id); //drop $this->properties['city'] = new owa_dbColumn(); $this->properties['city']->setDataType(OWA_DTD_VARCHAR255); //drop $this->properties['country'] = new owa_dbColumn(); $this->properties['country']->setDataType(OWA_DTD_VARCHAR255); // drop $this->properties['site'] = new owa_dbColumn(); $this->properties['site']->setDataType(OWA_DTD_VARCHAR255); // move to abstract //$site_id = new owa_dbColumn('site_id', OWA_DTD_VARCHAR255); //$site_id->setForeignKey('base.site', 'site_id'); //$this->setProperty($site_id); // move to abstract //$nps = new owa_dbColumn('num_prior_sessions', OWA_DTD_INT); //$this->setProperty($nps); //drop $this->properties['is_robot'] = new owa_dbColumn(); $this->properties['is_robot']->setDataType(OWA_DTD_TINYINT); //drop $this->properties['is_browser'] = new owa_dbColumn(); $this->properties['is_browser']->setDataType(OWA_DTD_TINYINT); //drop $this->properties['is_feedreader'] = new owa_dbColumn(); $this->properties['is_feedreader']->setDataType(OWA_DTD_TINYINT); // move to abstract //$medium = new owa_dbColumn('medium',OWA_DTD_VARCHAR255); //$this->setProperty($medium); // move to abstract //$source_id = new owa_dbColumn('source_id', OWA_DTD_BIGINT); //$source_id->setForeignKey('base.source_dim'); //$this->setProperty($source_id); // move to abstract //$ad_id = new owa_dbColumn('ad_id', OWA_DTD_BIGINT); //$ad_id->setForeignKey('base.ad_dim'); //$this->setProperty($ad_id); // move to abstract //$campaign_id = new owa_dbColumn('campaign_id', OWA_DTD_BIGINT); //$campaign_id->setForeignKey('base.campaign_dim'); //$this->setProperty($campaign_id); $this->properties['latest_attributions'] = new owa_dbColumn(); $this->properties['latest_attributions']->setDataType(OWA_DTD_BLOB); // create goal related columns $gcount = owa_coreAPI::getSetting('base', 'numGoals'); for ($num = 1; $num <= $gcount; $num++) { $col_name = 'goal_' . $num; $goal_col = new owa_dbColumn($col_name, OWA_DTD_TINYINT); $this->setProperty($goal_col); $col_name = 'goal_' . $num . '_start'; $goal_col = new owa_dbColumn($col_name, OWA_DTD_TINYINT); $this->setProperty($goal_col); $col_name = 'goal_' . $num . '_value'; $goal_col = new owa_dbColumn($col_name, OWA_DTD_BIGINT); $this->setProperty($goal_col); } $num_goals = new owa_dbColumn('num_goals', OWA_DTD_TINYINT); $this->setProperty($num_goals); $num_goal_starts = new owa_dbColumn('num_goal_starts', OWA_DTD_TINYINT); $this->setProperty($num_goal_starts); $goals_value = new owa_dbColumn('goals_value', OWA_DTD_BIGINT); $this->setProperty($goals_value); // move to abstract //location //$location_id = new owa_dbColumn('location_id', OWA_DTD_BIGINT); //$location_id->setForeignKey('base.location_dim'); //$this->setProperty($location_id); // move to abstract // language //$language = new owa_dbColumn('language', OWA_DTD_VARCHAR255); //$this->setProperty($language); // transaction count $commerce_trans_count = new owa_dbColumn('commerce_trans_count', OWA_DTD_INT); $this->setProperty($commerce_trans_count); // revenue including tax and shipping $commerce_trans_revenue = new owa_dbColumn('commerce_trans_revenue', OWA_DTD_BIGINT); $this->setProperty($commerce_trans_revenue); // revenue excluding tax and shipping $commerce_items_revenue = new owa_dbColumn('commerce_items_revenue', OWA_DTD_BIGINT); $this->setProperty($commerce_items_revenue); // distinct number of items $commerce_items_count = new owa_dbColumn('commerce_items_count', OWA_DTD_INT); $this->setProperty($commerce_items_count); // total quantity of all items $commerce_items_quantity = new owa_dbColumn('commerce_items_quantity', OWA_DTD_INT); $this->setProperty($commerce_items_quantity); // shipping revenue $commerce_shipping_revenue = new owa_dbColumn('commerce_shipping_revenue', OWA_DTD_BIGINT); $this->setProperty($commerce_shipping_revenue); // tax revenue $commerce_tax_revenue = new owa_dbColumn('commerce_tax_revenue', OWA_DTD_BIGINT); $this->setProperty($commerce_tax_revenue); }
function __construct() { $this->setTableName('request'); $this->setSummaryLevel(0); // set common fact table columns $parent_columns = parent::__construct(); foreach ($parent_columns as $pcolumn) { $this->setProperty($pcolumn); } // properties // move to abstract //$this->properties['id'] = new owa_dbColumn; //$this->properties['id']->setDataType(OWA_DTD_BIGINT); //$this->properties['id']->setPrimaryKey(); // move to abstract //$visitor_id = new owa_dbColumn('visitor_id', OWA_DTD_BIGINT); //$visitor_id->setForeignKey('base.visitor'); //$this->setProperty($visitor_id); // move to abstract //$session_id = new owa_dbColumn('session_id', OWA_DTD_BIGINT); //$session_id->setForeignKey('base.session'); //$this->setProperty($session_id); // needed? $inbound_visitor_id = new owa_dbColumn('inbound_visitor_id', OWA_DTD_BIGINT); $inbound_visitor_id->setForeignKey('base.visitor'); $this->setProperty($inbound_visitor_id); // needed? $inbound_session_id = new owa_dbColumn('inbound_session_id', OWA_DTD_BIGINT); //$inbound_session_id->setForeignKey('base.session'); $this->setProperty($inbound_session_id); // needed anymore? $this->properties['feed_subscription_id'] = new owa_dbColumn(); $this->properties['feed_subscription_id']->setDataType(OWA_DTD_BIGINT); // move to abstract //$this->properties['user_name'] = new owa_dbColumn; //$this->properties['user_name']->setDataType(OWA_DTD_VARCHAR255); //drop $this->properties['user_email'] = new owa_dbColumn(); $this->properties['user_email']->setDataType(OWA_DTD_VARCHAR255); // move to abstract //$ts = new owa_dbColumn; //$ts->setName('timestamp'); //$ts->setDataType(OWA_DTD_BIGINT); //$ts->setIndex(); //$this->setProperty($ts); // move to abstract //$yyyymmdd = new owa_dbColumn; //$yyyymmdd->setName('yyyymmdd'); //$yyyymmdd->setDataType(OWA_DTD_INT); //$yyyymmdd->setIndex(); //$this->setProperty($yyyymmdd); //$this->properties['last_req'] = new owa_dbColumn; //$this->properties['last_req']->setDataType(OWA_DTD_BIGINT); /* $this->properties['year'] = new owa_dbColumn; $this->properties['year']->setDataType(OWA_DTD_INT); $this->properties['month'] = new owa_dbColumn; $this->properties['month']->setDataType(OWA_DTD_INT); $this->properties['day'] = new owa_dbColumn; $this->properties['day']->setDataType(OWA_DTD_TINYINT2); $this->properties['dayofweek'] = new owa_dbColumn; $this->properties['dayofweek']->setDataType(OWA_DTD_VARCHAR10); $this->properties['dayofyear'] = new owa_dbColumn; $this->properties['dayofyear']->setDataType(OWA_DTD_INT); $this->properties['weekofyear'] = new owa_dbColumn; $this->properties['weekofyear']->setDataType(OWA_DTD_INT); */ // drop these at some point $this->properties['hour'] = new owa_dbColumn(); $this->properties['hour']->setDataType(OWA_DTD_TINYINT2); $this->properties['minute'] = new owa_dbColumn(); $this->properties['minute']->setDataType(OWA_DTD_TINYINT2); $this->properties['second'] = new owa_dbColumn(); $this->properties['second']->setDataType(OWA_DTD_TINYINT2); $this->properties['msec'] = new owa_dbColumn(); $this->properties['msec']->setDataType(OWA_DTD_INT); // wrong data type // move to abstract //$referer_id = new owa_dbColumn('referer_id', OWA_DTD_VARCHAR255); //$referer_id->setForeignKey('base.referer'); //$this->setProperty($referer_id); // wrong data type $document_id = new owa_dbColumn('document_id', OWA_DTD_VARCHAR255); $document_id->setForeignKey('base.document'); $this->setProperty($document_id); // move to abstract //$site_id = new owa_dbColumn('site_id', OWA_DTD_VARCHAR255); //$site_id->setForeignKey('base.site', 'site_id'); //$this->setProperty($site_id); // drop $this->properties['site'] = new owa_dbColumn(); $this->properties['site']->setDataType(OWA_DTD_VARCHAR255); // move to abstract //$this->properties['ip_address'] = new owa_dbColumn; //$this->properties['ip_address']->setDataType(OWA_DTD_VARCHAR255); // move to abstract // wrong data type -- migrate //$host_id = new owa_dbColumn('host_id', OWA_DTD_VARCHAR255); //$host_id->setForeignKey('base.host'); //$this->setProperty($host_id); // move to abstract // wrong data type //$os_id = new owa_dbColumn('os_id', OWA_DTD_VARCHAR255); //$os_id->setForeignKey('base.os'); //$this->setProperty($os_id); //drop $this->properties['os'] = new owa_dbColumn(); $this->properties['os']->setDataType(OWA_DTD_VARCHAR255); // move to abstract // wrong data type //$ua_id = new owa_dbColumn('ua_id', OWA_DTD_VARCHAR255); //$ua_id->setForeignKey('base.ua'); //$this->setProperty($ua_id); //prior page $prior_document_id = new owa_dbColumn('prior_document_id', OWA_DTD_BIGINT); $prior_document_id->setForeignKey('base.document'); $this->setProperty($prior_document_id); // move to abstract //$nps = new owa_dbColumn('num_prior_sessions', OWA_DTD_INT); //$this->setProperty($nps); // move to abstract //$this->properties['is_new_visitor'] = new owa_dbColumn; //$this->properties['is_new_visitor']->setDataType(OWA_DTD_TINYINT); // move to abstract //$this->properties['is_repeat_visitor'] = new owa_dbColumn; //$this->properties['is_repeat_visitor']->setDataType(OWA_DTD_TINYINT); // drop $this->properties['is_comment'] = new owa_dbColumn(); $this->properties['is_comment']->setDataType(OWA_DTD_TINYINT); $this->properties['is_entry_page'] = new owa_dbColumn(); $this->properties['is_entry_page']->setDataType(OWA_DTD_TINYINT); $this->properties['is_browser'] = new owa_dbColumn(); $this->properties['is_browser']->setDataType(OWA_DTD_TINYINT); $this->properties['is_robot'] = new owa_dbColumn(); $this->properties['is_robot']->setDataType(OWA_DTD_TINYINT); $this->properties['is_feedreader'] = new owa_dbColumn(); $this->properties['is_feedreader']->setDataType(OWA_DTD_TINYINT); //move to abstract //$location_id = new owa_dbColumn('location_id', OWA_DTD_BIGINT); //$location_id->setForeignKey('base.location_dim'); //$this->setProperty($location_id); //move to abstract //$language = new owa_dbColumn('language', OWA_DTD_VARCHAR255); //$this->setProperty($language); }
function __construct() { $this->setTableName('commerce_line_item_fact'); // set common fact table columns $parent_columns = parent::__construct(); foreach ($parent_columns as $pcolumn) { $this->setProperty($pcolumn); } // move to abstract //$id = new owa_dbColumn('id', OWA_DTD_BIGINT); //$id->setPrimaryKey(); //$this->setProperty($id); // move to abstract //$visitor_id = new owa_dbColumn('visitor_id', OWA_DTD_BIGINT); //$visitor_id->setForeignKey('base.visitor'); //$this->setProperty($visitor_id); // move to abstract //$session_id = new owa_dbColumn('session_id', OWA_DTD_BIGINT); //$session_id->setForeignKey('base.session'); //$this->setProperty($session_id); $document_id = new owa_dbColumn('document_id', OWA_DTD_BIGINT); $document_id->setForeignKey('base.document'); $this->setProperty($document_id); // move to abstract //$site_id = new owa_dbColumn('site_id', OWA_DTD_VARCHAR255); //$site_id->setForeignKey('base.site', 'site_id'); //$this->setProperty($site_id); // move to abstract //$ua_id = new owa_dbColumn('ua_id', OWA_DTD_BIGINT); //$ua_id->setForeignKey('base.ua'); //$this->setProperty($ua_id); // move to abstract //$host_id = new owa_dbColumn('host_id', OWA_DTD_BIGINT); //$host_id->setForeignKey('base.host'); //$this->setProperty($host_id); // move to abstract //$os_id = new owa_dbColumn('os_id', OWA_DTD_BIGINT); //$os_id->setForeignKey('base.os'); //$this->setProperty($os_id); // move to abstract //$location_id = new owa_dbColumn('location_id', OWA_DTD_BIGINT); //$location_id->setForeignKey('base.location_dim'); //$this->setProperty($location_id); // move to abstract //$medium = new owa_dbColumn('medium',OWA_DTD_VARCHAR255); //$this->setProperty($medium); // move to abstract //$source_id = new owa_dbColumn('source_id', OWA_DTD_BIGINT); //$source_id->setForeignKey('base.source_dim'); //$this->setProperty($source_id); // move to abstract //$ad_id = new owa_dbColumn('ad_id', OWA_DTD_BIGINT); //$ad_id->setForeignKey('base.ad_dim'); //$this->setProperty($ad_id); // move to abstract //$campaign_id = new owa_dbColumn('campaign_id', OWA_DTD_BIGINT); //$campaign_id->setForeignKey('base.campaign_dim'); //$this->setProperty($campaign_id); // move to abstract //$referring_search_term_id = new owa_dbColumn('referring_search_term_id', OWA_DTD_BIGINT); //$referring_search_term_id->setForeignKey('base.search_term_dim'); //$this->setProperty($referring_search_term_id); // move to abstract //$timestamp = new owa_dbColumn('timestamp', OWA_DTD_INT); //$this->setProperty($timestamp); // move to abstract //$yyyymmdd = new owa_dbColumn('yyyymmdd', OWA_DTD_INT); //$this->setProperty($yyyymmdd); $order_id = new owa_dbColumn('order_id', OWA_DTD_VARCHAR255); $order_id->setIndex(); $this->setProperty($order_id); $sku = new owa_dbColumn('sku', OWA_DTD_VARCHAR255); $this->setProperty($sku); $product_name = new owa_dbColumn('product_name', OWA_DTD_VARCHAR255); $this->setProperty($product_name); $category = new owa_dbColumn('category', OWA_DTD_VARCHAR255); $this->setProperty($category); $unit_price = new owa_dbColumn('unit_price', OWA_DTD_BIGINT); $this->setProperty($unit_price); $quantity = new owa_dbColumn('quantity', OWA_DTD_INT); $this->setProperty($quantity); $item_revenue = new owa_dbColumn('item_revenue', OWA_DTD_BIGINT); $this->setProperty($item_revenue); }