From 4774d4f66bf45a6a377e33877f6f4b623a882cfb Mon Sep 17 00:00:00 2001 From: Reuven Gonzales Date: Thu, 5 Sep 2024 13:16:18 -0700 Subject: [PATCH] Disable dbt metrics models (#2076) * Disable metrics entirely in dbt * Just remove the metrics files --- .../intermediate/metrics/int_metrics.sql | 29 ------------------- .../dbt/models/marts/directory/metrics_v0.sql | 21 -------------- 2 files changed, 50 deletions(-) delete mode 100644 warehouse/dbt/models/intermediate/metrics/int_metrics.sql delete mode 100644 warehouse/dbt/models/marts/directory/metrics_v0.sql diff --git a/warehouse/dbt/models/intermediate/metrics/int_metrics.sql b/warehouse/dbt/models/intermediate/metrics/int_metrics.sql deleted file mode 100644 index 1ad011a1f..000000000 --- a/warehouse/dbt/models/intermediate/metrics/int_metrics.sql +++ /dev/null @@ -1,29 +0,0 @@ -{{ - config( - materialized='table', - ) -}} - -select distinct - {{ oso_id('"OSO"', '"oso"', 'metric') }} as metric_id, - "OSO" as metric_source, - "oso" as metric_namespace, - metric as metric_name, - metric as display_name, - "TODO" as description, - null as raw_definition, - "TODO" as definition_ref, - "UNKNOWN" as aggregation_function -from {{ ref('int_funding_metric__grants_received_usd') }} -union all -select distinct - {{ oso_id('"OSO"', '"oso"', 'metric', 'event_source') }} as metric_id, - "OSO" as metric_source, - "oso" as metric_namespace, - CONCAT(metric, "_", LOWER(event_source)) as metric_name, - CONCAT(metric, "_", LOWER(event_source)) as display_name, - "TODO" as description, - null as raw_definition, - "TODO" as definition_ref, - "UNKNOWN" as aggregation_function -from {{ ref('int_timeseries_superchain_metrics__all') }} diff --git a/warehouse/dbt/models/marts/directory/metrics_v0.sql b/warehouse/dbt/models/marts/directory/metrics_v0.sql deleted file mode 100644 index 4e1c8b6b1..000000000 --- a/warehouse/dbt/models/marts/directory/metrics_v0.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ - config(meta = { - 'sync_to_db': True, - 'index': { - 'idx_metric_id': ["metric_id"], - 'idx_metric_name': ["metric_source", "metric_namespace", "metric_name"], - } - }) -}} - -select - metrics.metric_id, - metrics.metric_source, - metrics.metric_namespace, - metrics.metric_name, - metrics.display_name, - metrics.description, - metrics.raw_definition, - metrics.definition_ref, - metrics.aggregation_function -from {{ ref('int_metrics') }} as metrics