-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: point in time and interval
models
- Loading branch information
Showing
8 changed files
with
91 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
select @metrics_sample_date(events.bucket_day) as metrics_sample_date, | ||
events.event_source, | ||
events.to_artifact_id as project_id, | ||
events.to_artifact_id as to_artifact_id, | ||
'' as from_artifact_id, | ||
@metric_name() as metric, | ||
COUNT(distinct events.from_artifact_id) as amount | ||
from metrics.events_daily_to_artifact as events | ||
where events.event_type = 'COMMIT_CODE' | ||
and events.bucket_day BETWEEN @metrics_start(DATE) AND @metrics_end(DATE) | ||
and events.bucket_day BETWEEN @metrics_start('DATE') AND @metrics_end('DATE') | ||
group by 1, | ||
metric, | ||
from_artifact_id, | ||
project_id, | ||
to_artifact_id, | ||
event_source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
select @metrics_sample_date(events.bucket_day) as metrics_sample_date, | ||
events.event_source, | ||
events.to_artifact_id as project_id, | ||
events.to_artifact_id as to_artifact_id, | ||
'' as from_artifact_id, | ||
@metric_name() as metric, | ||
COUNT(distinct events.from_artifact_id) as contributor_count | ||
COUNT(distinct events.from_artifact_id) as amount | ||
from metrics.events_daily_to_artifact as events | ||
where events.event_type in ( | ||
'COMMIT_CODE', | ||
'ISSUE_OPENED', | ||
'PULL_REQUEST_OPENED', | ||
'PULL_REQUEST_MERGED' | ||
) | ||
and events.bucket_day BETWEEN @metrics_start(DATE) AND @metrics_end(DATE) | ||
and events.bucket_day BETWEEN @metrics_start('DATE') AND @metrics_end('DATE') | ||
group by 1, | ||
metric, | ||
from_artifact_id, | ||
project_id, | ||
to_artifact_id, | ||
event_source |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
select @metrics_sample_date(events.bucket_day) as metrics_sample_date, | ||
events.event_source, | ||
events.to_artifact_id as project_id, | ||
events.to_artifact_id as to_artifact_id, | ||
'' as from_artifact_id, | ||
@metric_name() as metric, | ||
1 as amount, | ||
MIN(events.bucket_day) as first_commit_date | ||
from metrics.events_daily_to_artifact as events | ||
where events.event_type = 'COMMIT_CODE' | ||
and events.bucket_day BETWEEN @metrics_start(DATE) AND @metrics_end(DATE) | ||
and events.bucket_day BETWEEN @metrics_start('DATE') AND @metrics_end('DATE') | ||
group by 1, | ||
metric, | ||
from_artifact_id, | ||
project_id, | ||
to_artifact_id, | ||
event_source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
select @metrics_sample_date(events.bucket_day) as metrics_sample_date, | ||
events.event_source, | ||
events.to_artifact_id as project_id, | ||
events.to_artifact_id as to_artifact_id, | ||
'' as from_artifact_id, | ||
@metric_name() as metric, | ||
1 as amount, | ||
MAX(events.bucket_day) as last_commit_date | ||
from metrics.events_daily_to_artifact as events | ||
where events.event_type = 'COMMIT_CODE' | ||
and events.bucket_day BETWEEN @metrics_start(DATE) AND @metrics_end(DATE) | ||
and events.bucket_day BETWEEN @metrics_start('DATE') AND @metrics_end('DATE') | ||
group by 1, | ||
metric, | ||
from_artifact_id, | ||
project_id, | ||
to_artifact_id, | ||
event_source |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters