-- =========================================================
-- Vistas puente Edge-OEE UCEPSA demo
-- No mueven datos. Solo exponen mv_hot.edge_oee_* bajo schema ordenado.
-- =========================================================

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.eastron_readings AS
SELECT *
FROM mv_hot.edge_oee_eastron_readings;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.eastron_latest AS
SELECT *
FROM mv_hot.edge_oee_eastron_latest;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.eastron_dashboard AS
SELECT *
FROM mv_hot.edge_oee_eastron_dashboard;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.eastron_diagnosis_latest AS
SELECT *
FROM mv_hot.edge_oee_eastron_diagnosis_latest;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.live_telemetry AS
SELECT *
FROM mv_hot.edge_oee_live_telemetry;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.latest_machine_snapshot AS
SELECT *
FROM mv_hot.edge_oee_latest_machine_snapshot;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.node_events AS
SELECT *
FROM mv_hot.edge_oee_node_events;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.node_events_recent AS
SELECT *
FROM mv_hot.edge_oee_node_events_recent;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.machine_state_latest AS
SELECT *
FROM mv_hot.edge_oee_machine_state_latest;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.machine_stops AS
SELECT *
FROM mv_hot.edge_oee_machine_stops;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.open_stops AS
SELECT *
FROM mv_hot.edge_oee_open_stops;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.stops_recent AS
SELECT *
FROM mv_hot.edge_oee_stops_recent;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.stop_causes AS
SELECT *
FROM mv_hot.edge_oee_stop_causes;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.stop_cause_options AS
SELECT *
FROM mv_hot.edge_oee_stop_cause_options;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.stop_summary AS
SELECT *
FROM mv_hot.edge_oee_stop_summary_demo;

CREATE OR REPLACE VIEW mv_edge_oee_ucepsa_demo.machine_targets AS
SELECT *
FROM mv_hot.edge_oee_machine_targets;
