wialon_standard — the daily telemetry table
The table most queries start from. One row per vehicle per day, keyed on (date, unit_id), which is what makes a re-run of a date replace rather than duplicate. Fuel appears in several columns on purpose: Wialon calculates consumption more than one way, and collapsing them into a single number would hide the disagreement that is often the finding itself.
| Column | Type | What it holds |
|---|---|---|
| date, unit_id | date, varchar | Primary key — the grain of the table |
| unit_name | varchar | Denormalised so most queries need no join |
| trips_km, gps_km | numeric | Distance from trip detection and from raw GPS |
| trips_hours, engine_hours | numeric | Time in trips, and total engine time |
| motion_hours, idling_hours | numeric | Moving versus engine-on-and-stationary |
| consumed_fls_liters | numeric | Consumption from fuel level sensors |
| consumed_abs_liters | numeric | Consumption from an absolute-consumption sensor |
| consumed_math_liters | numeric | Consumption calculated mathematically |
| consumed_rates_liters | numeric | Consumption from configured rates |
| filled_liters, drained_liters | numeric | Daily totals for fillings and drains |
| consumed_kwh, charged_kwh | numeric | The same picture for electric vehicles |
| first_engine_on, last_engine_off | timestamp | Shift boundaries, without parsing messages |