dbt_github
dbt_github copied to clipboard
[Bug] int_github__pull_request_times.sql is dropping rows where no reviewers are explicitly requested
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the issue
The spine of the int_github__pull_request_times model is first_request_time
, which is a CTE that inner joins pull requests to requested_reviewer_history
. However, people can review pull requests without being explicitly requested, and then those pull requests can be merged. But because of the inner join, PRs without requested reviewers are dropped. This means that downstream, some merged PRs have a null merged_at timestamp.
Relevant error log or model output
No response
Expected behavior
Merged PRs should have a non-null merged_at timestamp.
Possible solution
Change the inner join to be a left join.
dbt Project configurations
n/a
Package versions
- package: fivetran/github
version: 0.7.0
What database are you using dbt with?
snowflake
How are you running this dbt package?
dbt Core™
dbt Version
1.8.0
Additional Context
No response
Are you willing to open a PR to help address this issue?
- [X] Yes.
- [ ] Yes, but I will need assistance.
- [ ] No.