database design - Approach to implement TIME SPAN/PERIOD dimension for SSAS cube -
we have huge traffic database (call data records). due amount of records , hardware limitations cant’ use source detail records reporting. summarize records in relational database using 15 minutes intervals , truncate source data immediately. these summarized records (events on time period) stored in warehouse , used fact table (molap). time spans/periods stored in sys_time_slices dimension table, simplified versions is:
create table [dbo].[sys_time_slices] ( [id] [int] identity(1, 1) not null, [datetime_start] [datetime] not null, [datetime_end] [datetime] not null ) on [primary] first records are:
datetime_start datetime_end 01-jan-13 00:00:00 01-jan-13 00:15:00 01-jan-13 00:15:00 01-jan-13 00:30:00 now putting cube , not sure how according best practices. have checked “step-by-step” book, internet tutorials on time dimension , related bi, still no clue. marking time_slices dimension time produced weird results. marking datetime_end dateended type produced more strange results.
i relatively new ssas have 15 years of experience dealing sql , customers reports, understand want , how in regular sql.
we have provide reports hour, day, week , month granularity. can done manual modification , configuration of attributes time_slices dimension hierarchy involved (w/o ssas special magic). have bells & whistles of time business intelligence (day on day growth , on).
more important old data (6+ months) never updated , source warehouse table being archived. in cube need old data day level of detail saving space on server. somehow achieved partitions – not sure time specifics.
given considerations above there recommended/common approach time span/period dimension? hints? books on subject? should change our warehouse logic?
this related ssas - facts happened on time range, there bit different question. using 2008r2 can upgrade 2012 needed.
in cases, better use 2 separate dimensions date , time. time in case have 96 (24 * 4) members. these aggregated hours, , depending on reporting/user needs other time ranges shift names. use integer key this, maybe "speaking key" 1415 time span 2:15 pm 2:30 pm (i. e. hour of start * 100 + minutes of start). make easy calculate foreign key in fact table datetime_start column. can assign meaningless integer surrogate keys each record.
the date dimension contain days granularity, , have attributes day of week holiday yes/no, month, year, quarter, ... depends on reporting necessities. better prepare more fewer attributes here, makes life reporting easier. , dimension table has few records, there no need restrict number of attributes much. can use similar structure integer primary key of table, e. g. 20131009 october, 9, 2013. again, arbitrary integer surrogate key well.
Comments
Post a Comment