fix(ucepsa): recreate fast machine state view from latest snapshot
This commit is contained in:
parent
0061c6a616
commit
0e4871d908
@ -1,5 +1,30 @@
|
||||
CREATE OR REPLACE VIEW mv_reports_ucepsa_demo.latest_machine_state_fast AS
|
||||
SELECT *
|
||||
FROM mv_reports_ucepsa_demo.machine_state_latest;
|
||||
DROP VIEW IF EXISTS mv_reports_ucepsa_demo.latest_machine_state_fast;
|
||||
|
||||
CREATE VIEW mv_reports_ucepsa_demo.latest_machine_state_fast AS
|
||||
SELECT
|
||||
ts,
|
||||
ingest_ts,
|
||||
age_s,
|
||||
tenant,
|
||||
site,
|
||||
asset,
|
||||
machine_id,
|
||||
order_id,
|
||||
voltage_l1_v,
|
||||
current_l1_a,
|
||||
power_total_kw,
|
||||
frequency_hz,
|
||||
import_kwh,
|
||||
export_kwh,
|
||||
comm_ok,
|
||||
error_text,
|
||||
machine_auto_signal,
|
||||
machine_running,
|
||||
cycle_pulse_count,
|
||||
cycle_rate_ppm,
|
||||
last_cycle_age_s,
|
||||
digital_inputs,
|
||||
payload_json
|
||||
FROM mv_reports_ucepsa_demo.latest_machine_snapshot;
|
||||
|
||||
GRANT SELECT ON mv_reports_ucepsa_demo.latest_machine_state_fast TO grafana_ucepsa_ro;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user