From c15b78e3f081674920549e581604cdde3b0e8acd Mon Sep 17 00:00:00 2001 From: "Wei-Chun, Chang" Date: Tue, 14 Feb 2023 14:49:20 +0800 Subject: [PATCH] Add a new column and metric filter Signed-off-by: Wei-Chun, Chang Co-authored-by: Timothy Lee --- models/marts/metrics.yml | 2 ++ models/staging/stg_commits.sql | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/models/marts/metrics.yml b/models/marts/metrics.yml index 6745790..cd6d8c1 100644 --- a/models/marts/metrics.yml +++ b/models/marts/metrics.yml @@ -43,3 +43,5 @@ metrics: label: Active authors type_params: measure: active_authors + filter: | + {{ Dimension('repo__author') }} != 'github-actions[bot]' diff --git a/models/staging/stg_commits.sql b/models/staging/stg_commits.sql index f04dda3..e789e01 100644 --- a/models/staging/stg_commits.sql +++ b/models/staging/stg_commits.sql @@ -17,7 +17,8 @@ renamed as ( email, message, date as datetime, - raw_date + raw_date, + concat('UTC', substr(raw_date, 20)) as utc_offset from source )