View VMF_ReadingByHourSnapshot

Card of view VMF_ReadingByHourSnapshot

Name

VMF_ReadingByHourSnapshot

Comment

See documentation on MF_ReadingByHourSnapshot in the StarsEnergy package.

Dimensional Type

Fact


SQL query of the view VMF_ReadingByHourSnapshot

select
MD_Point_SurrogateKey,
MD_Date_DateInteger,
MD_Time_TimeInteger,
mfr.MD_Unit_SurrogateKey,
MD_ThingM_SurrogateKey,
MD_Source_SurrogateKey,
MD_Vend_SurrogateKey,
MD_Room_SurrogateKey,
MD_Building_SurrogateKey,
MD_MQual_SurrogateKey,
-- MF_ReadHourSnap_RealGrain,
MF_ReadHourSnap_AvgValue,
MF_ReadHourSnap_MaxValue,
MF_ReadHourSnap_MinValue,
-- MF_ReadHourSnap_Variance,
-- MF_ReadHourSnap_Coverage,
CASE
WHEN MD_Unit_BtuConversionFactor IS NOT NULL
THEN MF_ReadHourSnap_AvgValue * MD_Unit_BtuConversionFactor
ELSE NULL
END AS VMF_ReadHourSnap_AvgValueInBtus

from
MF_ReadingByHourSnapshot mfr
INNER JOIN MD_UnitOfMeasurement mdu
ON mfr.MD_Unit_SurrogateKey = mdu.MD_Unit_SurrogateKey


List of outgoing view references of the view VMF_ReadingByHourSnapshot

Name

Parent Table/View

ViewReference_191

VMD_Vendor (Shortcut)

ViewReference_192

VMD_Room (Shortcut)

ViewReference_193

VMD_Building (Shortcut)

ViewReference_194

VMD_MeasurementQuality

ViewReference_195

VMD_TimeToHour

ViewReference_196

VMD_Date (Shortcut)

ViewReference_197

VMD_Point

ViewReference_198

VMD_UnitOfMeasurement

ViewReference_199

VMD_ThingMeasured

ViewReference_200

VMD_Source


List of diagrams containing the view VMF_ReadingByHourSnapshot

Name

ViewsEnergyDiagram


List of permissions of the view VMF_ReadingByHourSnapshot

Grant

User

SELECT,VIEW DEFINITION

EnergyReader


List of view columns of the view VMF_ReadingByHourSnapshot

Name

Data Type

Comment

Length

MD_Point_SurrogateKey

numeric

 

 

MD_Date_DateInteger

int

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.

 

MD_Time_TimeInteger

int

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.

 

MD_Unit_SurrogateKey

numeric

 

 

MD_ThingM_SurrogateKey

numeric

 

 

MD_Source_SurrogateKey

numeric

 

 

MD_Vend_SurrogateKey

numeric

Foreign key linking to a row in MD_Vendor, providing information on the vendor whose device was used to take a given measurement.

 

MD_Room_SurrogateKey

numeric

 

 

MD_Building_SurrogateKey

numeric

 

 

MD_MQual_SurrogateKey

numeric

Many systems associate quality ratings with measurements, and this foreign key allows that relationship to be implemented here. Supported qualities include: Good, Bad, Uncertain.

 

MF_ReadHourSnap_AvgValue

double precision

This is the basic 'value' field for MF_ReadingsByHourSnapshot.

Values in this field are averaged (or split up, resulting from downwards allocation of values collected at a grain larger/higher than per hour).

 

MF_ReadHourSnap_MaxValue

double precision

If a measurement gets taken over a period of time, the measurement device may (in addition to an average or cumulative value) provide a max/min value. The max is provided here, if available. If it is not available, then this value defaults to MD_ReadHourSnap_AvgValue.

 

MF_ReadHourSnap_MinValue

double precision

If a measurement gets taken over a period of time, the measurement device may (in addition to an average or cumulative value) provide a max/min value. The min is provided here, if available. If it is not available, then this value defaults to MD_ReadHourSnap_AvgValue.

 

VMF_READHOURSNAP_AVGVALUEINBTUS

 

This value is typically not useful here, since averages of energy values typically are not useful. We average, instead, power values, such as kilowatts, volts, etc. Power values cannot be converted to BTUs, which are measures of work or energy (power over time periods).