Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sqlmesh): create dev to project graph #2866

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions warehouse/metrics_mesh/models/code/int_developers_by_project.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MODEL (
name metrics.int_developers_by_project,
description 'Relationships between developers and projects (by commits)',
kind FULL,
);


select
events.from_artifact_id as developer_artifact_id,
events.to_artifact_id,
events.project_id,
repositories.language,
min(events.bucket_day) as first_contribution_time,
max(events.bucket_day) as last_contribution_time,
count(distinct events.bucket_day) as num_days_contributed,
sum(events.amount) as num_commits
from metrics.int_events_daily_to_project as events
join metrics.int_repositories as repositories
on events.to_artifact_id = repositories.artifact_id
where events.event_type = 'COMMIT_CODE'
group by 1,2,3,4
Loading