Open jonatas opened 1 month ago
Query example to get the views in the proper order:
WITH RECURSIVE caggs AS (
SELECT mat_hypertable_id, parent_mat_hypertable_id, user_view_name
FROM _timescaledb_catalog.continuous_agg
WHERE user_view_name = 'metrics_by_week'
UNION ALL
SELECT continuous_agg.mat_hypertable_id, continuous_agg.parent_mat_hypertable_id, continuous_agg.user_view_name
FROM _timescaledb_catalog.continuous_agg
JOIN caggs ON caggs.parent_mat_hypertable_id = continuous_agg.mat_hypertable_id
)
SELECT * FROM caggs ORDER BY mat_hypertable_id;
I fall into a problem while implementing rubygems/rubygems.org#4642 which I have multiple views that are interdependent but the dump is in the wrong order.
Here we go with the error:
Because the schema file is bringing
_per_day
before the_per_hour
.