Skip to content

Commit b3f2554

Browse files
feature/freshness-updates (#41)
* feature/freshness-updates * changelog pr link update * update package version in README --------- Co-authored-by: Jamie Rodriguez <[email protected]>
1 parent 4a16ae9 commit b3f2554

File tree

9 files changed

+65
-28
lines changed

9 files changed

+65
-28
lines changed

.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 '{asana__using_tags: false, asana__using_task_tags: false, asana_tag_identifier: missing, asana_task_tag_identifier: missing}' --target "$db" --full-refresh

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
# dbt_asana_source v0.9.0
2+
3+
[PR #41](https://github.com/fivetran/dbt_asana_source/pull/41) 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 `asana` in file
14+
`models/src_asana.yml`. The `freshness` top-level property should be moved
15+
into the `config` of `asana`.
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 Asana 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 `asana_source` package. Pin your dependency on v0.8.2 in your `packages.yml` file.
23+
3. Utilize a dbt [override](https://docs.getdbt.com/reference/resource-properties/overrides) to overwrite the package's `asana` 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_asana.yml` file and add an `overrides: asana_source` property.
24+
25+
## Under the Hood
26+
- Updates to ensure integration tests use latest version of dbt.
27+
128
# dbt_asana_source v0.8.2
229
This release includes the following updates:
330

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- Names columns for consistency across all packages and for easier analysis
1818
- Removes any rows that are soft-deleted
1919
- Adds freshness tests to source data
20+
- dbt Core >= 1.9.6 is required to run freshness tests out of the box.
2021
- Adds column-level testing where applicable. For example, all primary keys are tested for uniqueness and non-null values.
2122
- Generates a comprehensive data dictionary of your Asana data through the [dbt docs site](https://fivetran.github.io/dbt_asana_source/).
2223
- These tables are designed to work simultaneously with our [Asana transformation package](https://github.com/fivetran/dbt_asana).
@@ -34,7 +35,7 @@ Include the following asana_source package version in your `packages.yml` file.
3435
```yaml
3536
packages:
3637
- package: fivetran/asana_source
37-
version: [">=0.8.0", "<0.9.0"] # we recommend using ranges to capture non-breaking changes automatically
38+
version: [">=0.9.0", "<0.10.0"] # we recommend using ranges to capture non-breaking changes automatically
3839
```
3940
4041
### 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: 'asana_source'
3-
version: 0.8.2
3+
version: 0.9.0
44
require-dbt-version: [">=1.3.0", "<2.0.0"]
55
models:
66
asana_source:

integration_tests/ci/sample.profiles.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +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
85

96
integration_tests:
107
target: redshift

integration_tests/dbt_project.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config-version: 2
22
name: 'asana_source_integration_tests'
3-
version: 0.8.2
3+
version: 0.9.0
44
profile: 'integration_tests'
55
vars:
66
asana_schema: asana_source_integrations_tests_3
@@ -81,4 +81,7 @@ seeds:
8181

8282
dispatch:
8383
- macro_namespace: dbt_utils
84-
search_order: ['spark_utils', 'dbt_utils']
84+
search_order: ['spark_utils', 'dbt_utils']
85+
86+
flags:
87+
send_anonymous_usage_stats: False

integration_tests/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ 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
77
dbt-databricks>=1.3.0,<2.0.0
8-
certifi==2025.1.31
8+
certifi==2025.1.31

models/src_asana.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ sources:
77

88
loader: fivetran
99
loaded_at_field: _fivetran_synced
10-
11-
freshness:
12-
warn_after: {count: 72, period: hour}
13-
error_after: {count: 96, period: hour}
10+
11+
config:
12+
freshness:
13+
warn_after: {count: 72, period: hour}
14+
error_after: {count: 96, period: hour}
1415

1516

1617
tables:
1718
- name: user
1819
identifier: "{{ var('asana_user_identifier', 'user')}}"
1920
description: Table of all accounts in the organization
20-
freshness: null
21+
config:
22+
freshness: null
2123
columns:
2224
- name: id
2325
description: System generated unique ID for a user
@@ -68,7 +70,8 @@ sources:
6870
- name: project
6971
identifier: "{{ var('asana_project_identifier', 'project')}}"
7072
description: Table containing all projects
71-
freshness: null
73+
config:
74+
freshness: null
7275
columns:
7376
- name: id
7477
description: System generated unique ID of the project.
@@ -121,7 +124,8 @@ sources:
121124
- name: team
122125
identifier: "{{ var('asana_team_identifier', 'team')}}"
123126
description: Table of the teams within the organization
124-
freshness: null
127+
config:
128+
freshness: null
125129
columns:
126130
- name: id
127131
description: System generated unique ID for each team
@@ -134,9 +138,9 @@ sources:
134138
- name: tag
135139
identifier: "{{ var('asana_tag_identifier', 'tag')}}"
136140
description: Table of the custom tags made in the organization
137-
config:
141+
config:
138142
enabled: "{{ var('asana__using_tags', True) }}" # Disable if asana__using_tags is False
139-
freshness: null
143+
freshness: null
140144
columns:
141145
- name: id
142146
description: System generated ID for each tag
@@ -151,7 +155,8 @@ sources:
151155
- name: section
152156
identifier: "{{ var('asana_section_identifier', 'section')}}"
153157
description: Table of all sections within projects. If tasks in a project are not in an explicit user-made section, a default section called "(no section)" is created here
154-
freshness: null
158+
config:
159+
freshness: null
155160
columns:
156161
- name: id
157162
description: System generated unique ID for each section
@@ -165,7 +170,8 @@ sources:
165170
- name: project_task
166171
identifier: "{{ var('asana_project_task_identifier', 'project_task')}}"
167172
description: Table of tasks and the project(s) they each belong to. If a project doesn't have a task, it won't be in here (and vice versa)
168-
freshness: null
173+
config:
174+
freshness: null
169175
columns:
170176
- name: project_id
171177
description: Foreign key referencing a PROJECT the task belongs to
@@ -176,7 +182,8 @@ sources:
176182
- name: task_follower
177183
identifier: "{{ var('asana_task_follower_identifier', 'task_follower')}}"
178184
description: Table of tasks with the users that are following them. Tasks without users do not appear here.
179-
freshness: null
185+
config:
186+
freshness: null
180187
columns:
181188
- name: task_id
182189
description: Foreign key referencing the TASK being followed
@@ -187,9 +194,9 @@ sources:
187194
- name: task_tag
188195
identifier: "{{ var('asana_task_tag_identifier', 'task_tag')}}"
189196
description: Table of tasks with the tags attached to them. Tasks without tags (and vice versa) do not appear here.
190-
config:
197+
config:
191198
enabled: "{{ var('asana__using_task_tags', True) }}" # Disable if asana__using_task_tags is False
192-
freshness: null
199+
freshness: null
193200
columns:
194201
- name: task_id
195202
description: Foreign key referencing the TASK that is tagged
@@ -200,7 +207,8 @@ sources:
200207
- name: task_section
201208
identifier: "{{ var('asana_task_section_identifier', 'task_section')}}"
202209
description: Table of tasks and the section that they live under. Section-less tasks within projects appear here, but project-less tasks do not
203-
freshness: null
210+
config:
211+
freshness: null
204212
columns:
205213
- name: section_id
206214
description: Foreign key referencing the SECTION that the task lives under.

0 commit comments

Comments
 (0)