docs / data / schema
Star Schema v2
Constellation schema — 6 fact tables, 9 dimensions. Every table traces back to a backlog issue acceptance criterion.
Updated based on feedback from Cosette Schumacher (March 2026). See changelog below.
🔑 primary key · 🔗 foreign key · PBI = Power BI · SAC = SAP Analytics Cloud
← click any table to inspect it
changelog — changes based on feedback
Weather contains numeric, aggregatable measures (temperature, humidity, precipitation, radiation). It's a fact table, not a dimension. Linked to fact_energy via date_key.
Separated date and time: dim_datetime at minute grain for sensor facts, dim_date at day grain for weather and device health.
dim_sensor and dim_device had a redundant hierarchy. In our data, the sensor is an attribute of the device (sensor_type). One dimension is enough.
fact_sensor_reliability was not linked to dim_room. Fixed: fact_device_health_day includes room_key for spatial reliability analysis.
Weather is an input feature for ML training, not a dimension of predictions. We don't predict weather — we use it as an explanatory variable.
Avoids the anti-pattern of separate columns per prediction type. dim_target defines what we predict (energy, presence), dim_horizon defines the time horizon.
access control — issues #23 & #24
role
issue
accessible tables
filter
Owner
Issue #23
Row-level: own apartment only (dim_apartment.owner_user_id)
Renter
Issue #23
Row-level: own apartment only
all tables
facts
dimensions