Skip to content

Commit e103fd7

Browse files
Merge pull request #45 from fivetran/release/v0.7.0
Release/v0.7.0
2 parents 5ff7c4f + 775f55b commit e103fd7

17 files changed

+187
-52
lines changed

.buildkite/pipeline.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
steps:
2+
- label: ":postgres: Run Tests - Postgres"
3+
key: "run-dbt-postgres"
4+
plugins:
5+
- docker#v3.13.0:
6+
image: "python:3.8"
7+
shell: [ "/bin/bash", "-e", "-c" ]
8+
environment:
9+
- "BASH_ENV=/tmp/.bashrc"
10+
- "CI_POSTGRES_DBT_DBNAME"
11+
- "CI_POSTGRES_DBT_HOST"
12+
- "CI_POSTGRES_DBT_PASS"
13+
- "CI_POSTGRES_DBT_USER"
14+
commands: |
15+
bash .buildkite/scripts/run_models.sh postgres
16+
217
- label: ":snowflake-db: Run Tests - Snowflake"
318
key: "run_dbt_snowflake"
419
plugins:
@@ -43,7 +58,7 @@ steps:
4358
commands: |
4459
bash .buildkite/scripts/run_models.sh redshift
4560
46-
- label: ":bricks: Run Tests - Databricks"
61+
- label: ":databricks: Run Tests - Databricks"
4762
key: "run_dbt_databricks"
4863
plugins:
4964
- docker#v3.13.0:

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# dbt_github v0.7.0
2+
3+
## 🚨 Breaking Change 🚨
4+
- Updated the following models to aggregate at the `repository` grain in addition to their time period grain. ([#42](https://github.com/fivetran/dbt_github/pull/42), [#43](https://github.com/fivetran/dbt_github/pull/43))
5+
- `github__daily_metrics`
6+
- `github__weekly_metrics`
7+
- `github__monthly_metrics`
8+
- `github__quarterly_metrics`
9+
## 🎉 Features
10+
- Added column `requested_reviewers` to provide a list of users that were requested to review on a pull request. This is to supplement the column `reviewers`, which provides a list of users that have submitted a reivew, whether or not they were requested to. ([#44](https://github.com/fivetran/dbt_github/pull/44))
11+
- PostgreSQL compatibility! ([#44](https://github.com/fivetran/dbt_github/pull/44))
12+
## 🔧 Bug Fix
13+
- Updated model `int_github__pull_request_reviewers` so that the list of reviewers generated does not contain duplicate usernames. ([#44](https://github.com/fivetran/dbt_github/pull/44))
14+
## 🚘 Under the Hood
15+
- For the metrics models that were updated, added unique-combination-of-column tests for the combination of the time period and repository. ([#44](https://github.com/fivetran/dbt_github/pull/44))
16+
- Removed uniqueness tests on time period in metrics models in favor of the combo test. ([#44](https://github.com/fivetran/dbt_github/pull/44))
17+
- Removed ordering in metrics models to improve efficiency. ([#44](https://github.com/fivetran/dbt_github/pull/44))
18+
## 📝 Contributors
19+
- @onimsha ([#42](https://github.com/fivetran/dbt_github/pull/42))
20+
121
# dbt_github v0.6.0
222
[PR #35](https://github.com/fivetran/dbt_github/pull/35) includes the following breaking changes:
323
## 🚨 Breaking Changes 🚨:

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ The following table provides a detailed list of all models materialized within t
2727
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2828
| [github__issues](https://fivetran.github.io/dbt_github/#!/model/model.github.github__issues) | Each record represents a GitHub issue, enriched with data about its assignees, milestones, and time comparisons. |
2929
| [github__pull_requests](https://fivetran.github.io/dbt_github/#!/model/model.github.github__pull_requests) | Each record represents a GitHub pull request, enriched with data about its repository, reviewers, and durations between review requests, merges and reviews. |
30-
| [github__daily_metrics](https://fivetran.github.io/dbt_github/#!/model/model.github.github__daily_metrics) | Each record represents a single day, enriched with metrics about PRs and issues that were created and closed during that period. |
31-
| [github__weekly_metrics](https://fivetran.github.io/dbt_github/#!/model/model.github.github__weekly_metrics) | Each record represents a single week, enriched with metrics about PRs and issues that were created and closed during that period. |
32-
| [github__monthly_metrics](https://fivetran.github.io/dbt_github/#!/model/model.github.github__monthly_metrics) | Each record represents a single month, enriched with metrics about PRs and issues that were created and closed during that period. |
33-
| [github__quarterly_metrics](https://fivetran.github.io/dbt_github/#!/model/model.github.github__quarterly_metrics) | Each record represents a single quarter, enriched with metrics about PRs and issues that were created and closed during that period. |
30+
| [github__daily_metrics](https://fivetran.github.io/dbt_github/#!/model/model.github.github__daily_metrics) | Each record represents a single day and repository, enriched with metrics about PRs and issues that were created and closed during that period. |
31+
| [github__weekly_metrics](https://fivetran.github.io/dbt_github/#!/model/model.github.github__weekly_metrics) | Each record represents a single week and repository, enriched with metrics about PRs and issues that were created and closed during that period. |
32+
| [github__monthly_metrics](https://fivetran.github.io/dbt_github/#!/model/model.github.github__monthly_metrics) | Each record represents a single month and repository, enriched with metrics about PRs and issues that were created and closed during that period. |
33+
| [github__quarterly_metrics](https://fivetran.github.io/dbt_github/#!/model/model.github.github__quarterly_metrics) | Each record represents a single quarter and repository, enriched with metrics about PRs and issues that were created and closed during that period. |
3434
<!--section-end-->
3535

3636
# 🎯 How do I use the dbt package?
3737
## Step 1: Prerequisites
3838
To use this dbt package, you must have the following:
3939

4040
- At least one Fivetran Github connector syncing data into your destination.
41-
- A **BigQuery**, **Snowflake**, **Redshift**, or **Databricks** destination.
41+
- A **BigQuery**, **Snowflake**, **Redshift**, **PostgreSQL**, or **Databricks** destination.
4242

4343
### Databricks Dispatch Configuration
4444
If you are using a Databricks destination with this package you will need to add the below (or a variation of the below) dispatch configuration within your `dbt_project.yml`. This is required in order for the package to accurately search for macros within the `dbt-labs/spark_utils` then the `dbt-labs/dbt_utils` packages respectively.
@@ -55,7 +55,7 @@ Include the following github package version in your `packages.yml` file.
5555
```yaml
5656
packages:
5757
- package: fivetran/github
58-
version: [">=0.6.0", "<0.7.0"]
58+
version: [">=0.7.0", "<0.8.0"]
5959
```
6060

6161
## Step 3: Define database and schema variables
@@ -125,7 +125,7 @@ packages:
125125
version: [">=1.0.0", "<2.0.0"]
126126
127127
- package: fivetran/github_source
128-
version: [">=0.6.0", "<0.7.0"]
128+
version: [">=0.7.0", "<0.8.0"]
129129
130130
- package: dbt-labs/spark_utils
131131
version: [">=0.3.0", "<0.4.0"]

dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config-version: 2
22
name: 'github'
3-
version: '0.6.0'
3+
version: '0.7.0'
44
require-dbt-version: [">=1.3.0", "<2.0.0"]
55
models:
66
github:

docs/catalog.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/manifest.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/run_results.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

integration_tests/dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'github_integration_tests'
2-
version: '0.6.0'
2+
version: '0.7.0'
33
config-version: 2
44
profile: 'integration_tests'
55
vars:

models/github.yml

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,24 @@ models:
174174
- name: reviewers
175175
description: List of Users who reviewed the pull request
176176

177+
- name: requested_reviewers
178+
description: List of Users who were requested to review the pull request
179+
177180
- name: number_of_reviews
178181
description: Number of times a pull request was reviewed
179182

180183
- name: github__daily_metrics
181184
description: >
182185
Summary numbers for issues and pull requests by day
186+
tests:
187+
- dbt_utils.unique_combination_of_columns:
188+
combination_of_columns:
189+
- repository
190+
- day
183191
columns:
184192
- name: day
185193
description: The reporting day
186194
tests:
187-
- unique
188195
- not_null
189196
- name: number_issues_opened
190197
description: The total number of issues created during this time period
@@ -207,6 +214,11 @@ models:
207214
- name: number_prs_closed_without_merge
208215
description: The total number of pull requests closed without a merge during this time period
209216

217+
- name: repository
218+
description: The name of the repository
219+
tests:
220+
- not_null
221+
210222
- name: sum_days_pr_open
211223
description: The total number of days a pull request opened during this time period was open
212224

@@ -217,11 +229,15 @@ models:
217229
- name: github__weekly_metrics
218230
description: >
219231
Summary numbers for issues and pull requests by week
232+
tests:
233+
- dbt_utils.unique_combination_of_columns:
234+
combination_of_columns:
235+
- repository
236+
- week
220237
columns:
221238
- name: week
222239
description: The reporting week
223240
tests:
224-
- unique
225241
- not_null
226242
- name: number_issues_opened
227243
description: The total number of issues created during this time period
@@ -249,15 +265,24 @@ models:
249265

250266
- name: longest_days_pr_open
251267
description: The longest number of days a pull request opened during this time period was open
268+
269+
- name: repository
270+
description: The name of the repository
271+
tests:
272+
- not_null
252273

253274
- name: github__monthly_metrics
254275
description: >
255276
Summary numbers for issues and pull requests by month
277+
tests:
278+
- dbt_utils.unique_combination_of_columns:
279+
combination_of_columns:
280+
- repository
281+
- month
256282
columns:
257283
- name: month
258284
description: The reporting month
259285
tests:
260-
- unique
261286
- not_null
262287
- name: number_issues_opened
263288
description: The total number of issues created during this time period
@@ -285,15 +310,24 @@ models:
285310

286311
- name: longest_days_pr_open
287312
description: The longest number of days a pull request opened during this time period was open
313+
314+
- name: repository
315+
description: The name of the repository
316+
tests:
317+
- not_null
288318

289319
- name: github__quarterly_metrics
290320
description: >
291321
Summary numbers for issues and pull requests by quarter
322+
tests:
323+
- dbt_utils.unique_combination_of_columns:
324+
combination_of_columns:
325+
- repository
326+
- quarter
292327
columns:
293328
- name: quarter
294329
description: The reporting quarter
295330
tests:
296-
- unique
297331
- not_null
298332
- name: number_issues_opened
299333
description: The total number of issues created during this time period
@@ -321,4 +355,8 @@ models:
321355

322356
- name: longest_days_pr_open
323357
description: The longest number of days a pull request opened during this time period was open
324-
358+
359+
- name: repository
360+
description: The name of the repository
361+
tests:
362+
- not_null

0 commit comments

Comments
 (0)