The Data Contract: What a Valid Reading Is
Learning objective: write down, before any cleaning, what makes a reading valid and how two readings are recognised as the same interval.
| Item | Contract | Why |
|---|---|---|
| Logical key | (meter_id, interval_start), compared after normalising the time | Identifies one interval, whatever the message or row id |
| Time | ISO 8601 with UTC offset; days cut in Asia/Taipei | The same instant written two ways is still one interval |
| Interval | 15 minutes, left-closed, right-open, aligned to :00/:15/:30/:45 | Expected count per day is 96 |
| Value and unit | Finite, non-negative decimal; unit Wh or kWh; Wh divided by 1,000 | Totals are only meaningful in one unit |
| Meter mapping | meter_id must be in the registry with the same building_id | A reading from an unknown meter cannot be assigned |
Info
- The contract checks four data-quality dimensions: completeness, accuracy, consistency and timeliness
Two rows describe meter A01 at 2026-11-18T01:45:00+08:00 and at 2026-11-17T17:45:00Z. Under the contract, what are they?