From bd437cf46dfbf304339cc41fcc3c962580b7573b Mon Sep 17 00:00:00 2001 From: Carl Cervone <42869436+ccerv1@users.noreply.github.com> Date: Mon, 7 Oct 2024 06:42:22 -0400 Subject: [PATCH] feat(dbt): add developer count to code metrics (#2323) --- .../metrics/int_code_metrics_by_project.sql | 10 ++++++++++ .../marts/metrics/code_metrics_by_project_v1.sql | 1 + 2 files changed, 11 insertions(+) diff --git a/warehouse/dbt/models/intermediate/metrics/int_code_metrics_by_project.sql b/warehouse/dbt/models/intermediate/metrics/int_code_metrics_by_project.sql index 74881de43..c6390401f 100644 --- a/warehouse/dbt/models/intermediate/metrics/int_code_metrics_by_project.sql +++ b/warehouse/dbt/models/intermediate/metrics/int_code_metrics_by_project.sql @@ -75,6 +75,15 @@ aggs as ( else 0 end ) as active_developer_count_6_months, + SUM( + case + when + metric = 'active_developer_count' + and time_interval = 'ALL' + then amount + else 0 + end + ) as developer_count, SUM( case when @@ -168,6 +177,7 @@ select code_metrics.repository_count, code_metrics.star_count, code_metrics.fork_count, + code_metrics.developer_count, code_metrics.contributor_count, code_metrics.contributor_count_6_months, code_metrics.new_contributor_count_6_months, diff --git a/warehouse/dbt/models/marts/metrics/code_metrics_by_project_v1.sql b/warehouse/dbt/models/marts/metrics/code_metrics_by_project_v1.sql index 7ce6c9fad..ffff0264e 100644 --- a/warehouse/dbt/models/marts/metrics/code_metrics_by_project_v1.sql +++ b/warehouse/dbt/models/marts/metrics/code_metrics_by_project_v1.sql @@ -16,6 +16,7 @@ select last_commit_date, star_count, fork_count, + developer_count, contributor_count, contributor_count_6_months, new_contributor_count_6_months,