diff --git a/warehouse/dbt/models/intermediate/metrics/int_metrics.sql b/warehouse/dbt/models/intermediate/metrics/int_metrics.sql index 8a226f1f4..031edd8c8 100644 --- a/warehouse/dbt/models/intermediate/metrics/int_metrics.sql +++ b/warehouse/dbt/models/intermediate/metrics/int_metrics.sql @@ -1,4 +1,4 @@ -select +select distinct {{ oso_id('"OSO"', '"oso"', 'metric') }} as metric_id, "OSO" as metric_source, "oso" as metric_namespace, diff --git a/warehouse/dbt/models/marts/metrics/timeseries_metrics_by_artifact_v0.sql b/warehouse/dbt/models/marts/metrics/timeseries_metrics_by_artifact_v0.sql index a37b1cfe3..5d19b3743 100644 --- a/warehouse/dbt/models/marts/metrics/timeseries_metrics_by_artifact_v0.sql +++ b/warehouse/dbt/models/marts/metrics/timeseries_metrics_by_artifact_v0.sql @@ -1,3 +1,13 @@ +{{ + config(meta = { + 'sync_to_db': True, + 'index': { + 'idx_metric_id': ["metric_id"], + 'idx_artifact_id': ["artifact_id"], + } + }) +}} + select metric_id, artifact_id, diff --git a/warehouse/dbt/models/marts/metrics/timeseries_metrics_by_project_v0.sql b/warehouse/dbt/models/marts/metrics/timeseries_metrics_by_project_v0.sql index 7dcd116fe..f0fd96b5e 100644 --- a/warehouse/dbt/models/marts/metrics/timeseries_metrics_by_project_v0.sql +++ b/warehouse/dbt/models/marts/metrics/timeseries_metrics_by_project_v0.sql @@ -1,3 +1,13 @@ +{{ + config(meta = { + 'sync_to_db': True, + 'index': { + 'idx_metric_id': ["metric_id"], + 'idx_project_id': ["project_id"], + } + }) +}} + select metric_id, project_id,