Skip to content
This repository was archived by the owner on Jan 20, 2026. It is now read-only.

Commit 8e02712

Browse files
feature/freshness-updates (#44)
* feature/freshness-updates * pr ref fix
1 parent cdb7aca commit 8e02712

10 files changed

Lines changed: 54 additions & 22 deletions

File tree

.buildkite/pipeline.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ steps:
33
key: "run-dbt-postgres"
44
plugins:
55
- docker#v3.13.0:
6-
image: "python:3.8"
6+
image: "python:3.10.13"
77
shell: [ "/bin/bash", "-e", "-c" ]
88
environment:
99
- "BASH_ENV=/tmp/.bashrc"
@@ -18,7 +18,7 @@ steps:
1818
key: "run_dbt_snowflake"
1919
plugins:
2020
- docker#v3.13.0:
21-
image: "python:3.8"
21+
image: "python:3.10.13"
2222
shell: [ "/bin/bash", "-e", "-c" ]
2323
environment:
2424
- "BASH_ENV=/tmp/.bashrc"
@@ -35,7 +35,7 @@ steps:
3535
key: "run_dbt_bigquery"
3636
plugins:
3737
- docker#v3.13.0:
38-
image: "python:3.8"
38+
image: "python:3.10.13"
3939
shell: [ "/bin/bash", "-e", "-c" ]
4040
environment:
4141
- "BASH_ENV=/tmp/.bashrc"
@@ -47,7 +47,7 @@ steps:
4747
key: "run_dbt_redshift"
4848
plugins:
4949
- docker#v3.13.0:
50-
image: "python:3.8"
50+
image: "python:3.10.13"
5151
shell: [ "/bin/bash", "-e", "-c" ]
5252
environment:
5353
- "BASH_ENV=/tmp/.bashrc"
@@ -62,7 +62,7 @@ steps:
6262
key: "run_dbt_databricks"
6363
plugins:
6464
- docker#v3.13.0:
65-
image: "python:3.8"
65+
image: "python:3.10.13"
6666
shell: [ "/bin/bash", "-e", "-c" ]
6767
environment:
6868
- "BASH_ENV=/tmp/.bashrc"

.buildkite/scripts/run_models.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ echo `pwd`
1717
cd integration_tests
1818
dbt deps
1919
dbt seed --target "$db" --full-refresh
20+
dbt source freshness --target "$db" || echo "...Only verifying freshness runs..."
2021
dbt run --target "$db" --full-refresh
2122
dbt test --target "$db"
2223
dbt run --vars '{github__using_repo_team: false}' --target "$db" --full-refresh

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ target/
33
dbt_modules/
44
logs/
55
.DS_Store
6-
dbt_packages/
6+
dbt_packages/
7+
env/

CHANGELOG.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,33 @@
1-
# dbt_github_source version.version
1+
# dbt_github_source v0.9.0
2+
3+
[PR #44](https://github.com/fivetran/dbt_github_source/pull/44) includes the following updates:
4+
5+
## Breaking Change for dbt Core < 1.9.6
6+
7+
> *Note: This is not relevant to Fivetran Quickstart users.*
8+
9+
Migrated `freshness` from a top-level source property to a source `config` in alignment with [recent updates](https://github.com/dbt-labs/dbt-core/issues/11506) from dbt Core. This will resolve the following deprecation warning that users running dbt >= 1.9.6 may have received:
10+
11+
```
12+
[WARNING]: Deprecated functionality
13+
Found `freshness` as a top-level property of `github` in file
14+
`models/src_github.yml`. The `freshness` top-level property should be moved
15+
into the `config` of `github`.
16+
```
17+
18+
**IMPORTANT:** Users running dbt Core < 1.9.6 will not be able to utilize freshness tests in this release or any subsequent releases, as older versions of dbt will not recognize freshness as a source `config` and therefore not run the tests.
19+
20+
If you are using dbt Core < 1.9.6 and want to continue running Github Source freshness tests, please elect **one** of the following options:
21+
1. (Recommended) Upgrade to dbt Core >= 1.9.6
22+
2. Do not upgrade your installed version of the `github_source` package. Pin your dependency on v0.8.0 in your `packages.yml` file.
23+
3. Utilize a dbt [override](https://docs.getdbt.com/reference/resource-properties/overrides) to overwrite the package's `github` source and apply freshness via the previous release top-level property route. This will require you to copy and paste the entirety of the previous release `src_github.yml` file and add an `overrides: github_source` property.
224

325
## Documentation
426
- Corrected references to connectors and connections in the README. ([#42](https://github.com/fivetran/dbt_github_source/pull/42))
527

28+
## Under the Hood
29+
- Updates to ensure integration tests use latest version of dbt.
30+
631
# dbt_github_source v0.8.0
732
[PR #39](https://github.com/fivetran/dbt_jira/dbt_github_source/39) contains the following updates:
833

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- Materializes [Github staging tables](https://fivetran.github.io/dbt_github_source/#!/overview/github_source/models/?g_v=1&g_e=seeds) which leverage data in the format described by [this ERD](https://fivetran.com/docs/applications/github/#schemainformation). These staging tables clean, test, and prepare your Github data from [Fivetran's connector](https://fivetran.com/docs/applications/github) for analysis by doing the following:
2121
- Name columns for consistency across all packages and for easier analysis
2222
- Adds freshness tests to source data
23+
- dbt Core >= 1.9.6 is required to run freshness tests out of the box
2324
- Adds column-level testing where applicable. For example, all primary keys are tested for uniqueness and non-null values.
2425
- Generates a comprehensive data dictionary of your Github data through the [dbt docs site](https://fivetran.github.io/dbt_github_source/).
2526
- These tables are designed to work simultaneously with our [Github transformation package](https://github.com/fivetran/dbt_github).
@@ -45,7 +46,7 @@ Include the following github_source package version in your `packages.yml` file.
4546
```yaml
4647
packages:
4748
- package: fivetran/github_source
48-
version: [">=0.8.0", "<0.9.0"] # we recommend using ranges to capture non-breaking changes automatically
49+
version: [">=0.9.0", "<0.10.0"] # we recommend using ranges to capture non-breaking changes automatically
4950
```
5051

5152
### Step 3: Define database and schema variables

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_source'
3-
version: '0.8.0'
3+
version: '0.9.0'
44
require-dbt-version: [">=1.3.0", "<2.0.0"]
55
models:
66
github_source:

integration_tests/ci/sample.profiles.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
# HEY! This file is used in the dbt package integrations tests with Buildkite.
33
# You should __NEVER__ check credentials into version control. Thanks for reading :)
44

5-
config:
6-
send_anonymous_usage_stats: False
7-
use_colors: True
8-
95
integration_tests:
106
target: redshift
117
outputs:

integration_tests/dbt_project.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'github_source_integration_tests'
2-
version: '0.8.0'
2+
version: '0.9.0'
33
config-version: 2
44
profile: 'integration_tests'
55
vars:
@@ -58,4 +58,7 @@ seeds:
5858

5959
dispatch:
6060
- macro_namespace: dbt_utils
61-
search_order: ['spark_utils', 'dbt_utils']
61+
search_order: ['spark_utils', 'dbt_utils']
62+
63+
flags:
64+
send_anonymous_usage_stats: False

integration_tests/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ dbt-redshift>=1.3.0,<2.0.0
44
dbt-postgres>=1.3.0,<2.0.0
55
dbt-spark>=1.3.0,<2.0.0
66
dbt-spark[PyHive]>=1.3.0,<2.0.0
7-
dbt-databricks>=1.3.0,<2.0.0
7+
dbt-databricks>=1.3.0,<2.0.0
8+
certifi==2025.1.31

models/src_github.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ sources:
66
schema: "{{var ('github_schema', 'github')}}"
77
loader: Fivetran
88
loaded_at_field: _fivetran_synced
9-
freshness:
10-
warn_after: {count: 72, period: hour}
11-
error_after: {count: 168, period: hour}
9+
config:
10+
freshness:
11+
warn_after: {count: 72, period: hour}
12+
error_after: {count: 168, period: hour}
1213

1314

1415
tables:
@@ -25,7 +26,8 @@ sources:
2526
- name: label
2627
identifier: "{{ var('github_label_identifier', 'label')}}"
2728
description: Table that contains labels that are used across your Github account within individual repositories.
28-
freshness: null
29+
config:
30+
freshness: null
2931
columns:
3032
- name: id
3133
description: Unique identifier of the Github label
@@ -164,7 +166,8 @@ sources:
164166
- name: repository
165167
identifier: "{{ var('github_repository_identifier', 'repository')}}"
166168
description: Table representing the file structure of a directory under git control
167-
freshness: null
169+
config:
170+
freshness: null
168171
columns:
169172
- name: id
170173
description: System generated unique id for the repository.
@@ -209,7 +212,8 @@ sources:
209212
- name: user
210213
identifier: "{{ var('github_user_identifier', 'user')}}"
211214
description: Table representing contributors to a git project
212-
freshness: null
215+
config:
216+
freshness: null
213217
columns:
214218
- name: id
215219
description: System generated unique id for the user.

0 commit comments

Comments
 (0)