Table MF_ReadingByHourAccumulating

Card of table MF_ReadingByHourAccumulating

Name

MF_ReadingByHourAccumulating

Dimensional Type

Fact

Comment

This fact table is structured a lot like MF_ReadingByHourSnapshot, except that it contains data that may be aggregated using SUM, in addition to MIN, MAX, AVG, etc. The data here, that is, is fully aggregatable.

For example, this table might hold data like 'System available time' (in seconds). This can be aggregated from hour to hour, day to day, to a total figure (giving us cumulative availability). Cubes based on this table should offer a percentage measure for time-based values calculated as (time value) / (total elapsed time). This allows us to see things like what percentage of the time a system was available.

A figure like 'Average power output,' however, does not belong here, since it cannot be aggregated. An average generally can't be summed. Likewise 'Power output,' if it indicates a wattage currently being produced, measured in, say, kW (kilowatts), cannot be summed. All you can do is average it over some period of time, or take its MIN, MAX, etc., and from there calculate kWh, kilowatt-hours.

Everything here is allocated down (or aggregated up) to the hourly level, so that everything is comparable, at least along the time dimension(s). Hours - the basic unit of temporal analysis here - must begin at minute 0 second 0 and end at minute 59, second 59. Hence there is no need to store end dates/times, since all end dates will be the same as start dates, and all end times will equal the start time + 59 minutes, 59 seconds. Rounding will be needed if a measurement's original grain is lower than per second. Links to MD_Time are only to rows where MD_Time_Second = 0.

Unlike MF_ReadingByHourSnapshot, this table has no fields for MIN, MAX, or AVG reading, although those can certainly be calculated, and may in fact be useful. They would be calculated for a grain higher than 'hour' like 'day' or 'year.'


Check constraint name of the table MF_ReadingByHourAccumulating

CKT_MF_READINGBYHOURACCUMULATI


List of outgoing references of the table MF_ReadingByHourAccumulating

Name

Parent Table

Foreign Key Columns

Relationship_200

MD_Building (Shortcut)

MD_Building_SurrogateKey

Relationship_202

MD_Room (Shortcut)

MD_Room_SurrogateKey

Relationship_203

MD_MeasurementQuality

MD_MQual_SurrogateKey

Relationship_219

MD_Time (Shortcut)

MD_Time_TimeInteger

Relationship_222

MD_Date (Shortcut)

MD_Date_DateInteger

Relationship_223

MD_Point

MD_Point_SurrogateKey

Relationship_224

MD_UnitOfMeasurement

MD_Unit_SurrogateKey

Relationship_225

MD_ThingMeasured

MD_ThingM_SurrogateKey

Relationship_226

MD_Source

MD_Source_SurrogateKey

Relationship_227

MD_Vendor (Shortcut)

MD_Vend_SurrogateKey


List of diagrams containing the table MF_ReadingByHourAccumulating

Name

StarsEnergyDiagram


List of columns of the table MF_ReadingByHourAccumulating

Name

Comment

Domain

Data Type

Length

MD_Point_SurrogateKey

 

<None>

numeric

 

MD_Date_DateInteger

Integer representation of the date (e.g., 20070101 for 1 Jan 2007). Defaults to 99991231, for situations where a date is required but none is available.

DW_DateInteger

int

 

MD_Time_TimeInteger

Integer representing the time of day in the format HHMMSS (e.g., 23:01:01 at one minute one second after eleven o'clock in the evening). Not typically used for reporting.

Unlike MD_Date_Dateinteger (in MD_Date), this integer is not really human-readable, because it's not set up for base-10. Rather, it's calculated using the formula: (hour << 16) Or (min << 8) Or (sec), where the Or's are logical, and the << operator is a binary left shift. In T-SQL, this is (hour * POWER(2, 16)) + (minute * POWER(2, 8)) + second.

<None>

int

 

MD_Unit_SurrogateKey

 

<None>

numeric

 

MD_ThingM_SurrogateKey

 

<None>

numeric

 

MD_Source_SurrogateKey

 

<None>

numeric

 

MD_Vend_SurrogateKey

 

<None>

numeric

 

MD_Building_SurrogateKey

 

<None>

numeric

 

MD_Room_SurrogateKey

 

<None>

numeric

 

MD_MQual_SurrogateKey

 

<None>

numeric

 

MF_ReadHourAcc_RealGrain

The real or original temporal granularity of measurement, before it was refactored (allocated/pro-rated) for this table.

This field does NOT tell us the original unit of measurement. That information is available via an optional foreign key.

DW_TimeUnit

varchar(16)

16

MF_ReadHourAcc_Value

Summable value for a given hour (like 'Total kilowatt hours produced' or 'Total seconds available').

<None>

double precision

 

MF_ReadHourAcc_ApplicableSqFt

Counter to most good data warehouse design, this value may be NULL. It holds the square footage of the associated room, and if that's not available, of the building that the measurement is attached to. The square footage may not always be available.

<None>

double precision

 

MF_ReadHourAcc_Coverage

Number of seconds covered for a given data point. Since the grain of this table is per hour, and the unit here is seconds, this defaults to 3600.

<None>

int

 

MF_ReadHourAcc_AuditKey

 

DW_AuditKey

bigint

 

MF_ReadHourAcc_Timestamp

 

<None>

timestamp

 


List of indexes of the table MF_ReadingByHourAccumulating

Name

Unique

Cluster

Primary

Foreign Key

Alternate Key

Table

MF_READINGBYHOURACCUMULATING_PK

TRUE

FALSE

TRUE

FALSE

FALSE

MF_ReadingByHourAccumulating

RELATIONSHIP_207_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_ReadingByHourAccumulating

RELATIONSHIP_211_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_ReadingByHourAccumulating

RELATIONSHIP_214_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_ReadingByHourAccumulating

RELATIONSHIP_235_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_ReadingByHourAccumulating

RELATIONSHIP_236_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_ReadingByHourAccumulating

RELATIONSHIP_237_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_ReadingByHourAccumulating

RELATIONSHIP_238_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_ReadingByHourAccumulating


List of keys of the table MF_ReadingByHourAccumulating

Name

Identifier_1