Skip to content

Commit

Permalink
attempt to reduce stages
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenac95 committed Dec 20, 2024
1 parent 75fa912 commit a7489f1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
8 changes: 8 additions & 0 deletions warehouse/metrics_mesh/models/metric_names_from_artifact.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
MODEL (
name metrics.metric_names_from_artifact,
kind FULL
);

SELECT DISTINCT
metric
FROM metrics.timeseries_metrics_to_artifact
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
MODEL (
name metrics.metric_names_from_collection,
kind FULL
);

SELECT DISTINCT
metric
FROM metrics.timeseries_metrics_to_collection
8 changes: 8 additions & 0 deletions warehouse/metrics_mesh/models/metric_names_from_project.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
MODEL (
name metrics.metric_names_from_project,
kind FULL
);

SELECT DISTINCT
metric
FROM metrics.timeseries_metrics_to_project
15 changes: 6 additions & 9 deletions warehouse/metrics_mesh/models/metrics_v0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ MODEL (
);

WITH unioned_metric_names AS (
SELECT DISTINCT
metric
FROM metrics.timeseries_metrics_to_artifact
SELECT *
FROM metrics.metric_names_from_artifact
UNION ALL
SELECT DISTINCT
metric
FROM metrics.timeseries_metrics_to_project
SELECT *
FROM metrics.metric_names_from_project
UNION ALL
SELECT DISTINCT
metric
FROM metrics.timeseries_metrics_to_collection
SELECT *
FROM metrics.metric_names_from_collection
), all_timeseries_metric_names AS (
SELECT DISTINCT
metric
Expand Down

0 comments on commit a7489f1

Please sign in to comment.