+
Skip to content

Bug fix & move macros to fivetran_utils #13

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

Merged
merged 2 commits into from
Oct 23, 2020
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ models:

vars:
dbt_utils_dispatch_list:
- github # likely the name of your root project
- dbt_utils
- fivetran_utils
5 changes: 0 additions & 5 deletions macros/_get_utils_namespaces.sql

This file was deleted.

20 changes: 0 additions & 20 deletions macros/string_agg.sql

This file was deleted.

2 changes: 1 addition & 1 deletion models/intermediate/github_issue_assignees.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ with issue_assignee as (

select
issue_assignee.issue_id,
{{ string_agg( 'github_user.login_name', "', '" )}} as assignees
{{ fivetran_utils.string_agg( 'github_user.login_name', "', '" )}} as assignees
from issue_assignee
join github_user on issue_assignee.user_id = github_user.user_id
group by 1
2 changes: 1 addition & 1 deletion models/intermediate/github_issue_labels.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ with issue_label as (

select
issue_id,
{{ string_agg( 'label', "', '" )}} as labels
{{ fivetran_utils.string_agg( 'label', "', '" )}} as labels
from issue_label
group by issue_id
2 changes: 1 addition & 1 deletion models/intermediate/github_pull_request_reviewers.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ with pull_request_review as (

select
pull_request_review.pull_request_id,
{{ string_agg( 'github_user.login_name', "', '" )}} as reviewers,
{{ fivetran_utils.string_agg( 'github_user.login_name', "', '" )}} as reviewers,
count(*) as number_of_reviews
from pull_request_review
left join github_user on pull_request_review.user_id = github_user.user_id
Expand Down
6 changes: 3 additions & 3 deletions models/intermediate/github_pull_request_times.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ with pull_request_review as (
pull_request.issue_id,
pull_request.pull_request_id,
-- Finds the first review that is by the requested reviewer and is not a dismissal
case when requested_reviewer_history.requested_id = pull_request_review.user_id then
min(case when requested_reviewer_history.requested_id = pull_request_review.user_id then
case when lower(pull_request_review.state) in ('commented', 'approved', 'changes_requested')
then pull_request_review.submitted_at end
else null end as time_of_first_requested_reviewer_review,
else null end) as time_of_first_requested_reviewer_review,
min(requested_reviewer_history.created_at) as time_of_first_request,
min(pull_request_review.submitted_at) as time_of_first_review_post_request
from pull_request
join requested_reviewer_history on requested_reviewer_history.pull_request_id = pull_request.pull_request_id
left join pull_request_review on pull_request_review.pull_request_id = pull_request.pull_request_id
and pull_request_review.submitted_at > requested_reviewer_history.created_at
group by 1, 2, 3
group by 1, 2

)

Expand Down
5 changes: 4 additions & 1 deletion packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
packages:
- package: fivetran/github_source
version: 0.1.1
version: 0.1.1

- git: https://github.com/fivetran/dbt_fivetran_utils.git
warn-unpinned: false
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载