Skip to content

Commit 717e0ce

Browse files
feature/freshness-updates (#23)
* feature/freshness-updates * changelog fix
1 parent a0357d4 commit 717e0ce

File tree

8 files changed

+46
-15
lines changed

8 files changed

+46
-15
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 '{sage_intacct__using_invoices: false, sage_intacct__using_bills: false}' --full-refresh --target "$db"

CHANGELOG.md

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

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- Materializes [Sage Intacct staging tables](https://fivetran.github.io/dbt_sage_intacct_source/#!/overview/sage_intacct_source/models/?g_v=1&g_e=seeds) which leverage data in the format described by [this ERD](https://fivetran.com/docs/applications/sage-intacct#schemainformation). These staging tables clean, test, and prepare your Sage Intacct data from [Fivetran's connector](https://fivetran.com/docs/applications/sage-intacct) for analysis by doing the following:
1717
- Names columns for consistency across all packages and for easier analysis
1818
- Adds freshness tests to source data
19+
- dbt Core >= 1.9.6 is required to run freshness tests out of the box.
1920
- Adds column-level testing where applicable. For example, all primary keys are tested for uniqueness and non-null values.
2021
- Generates a comprehensive data dictionary of your sage_intacct data through the [dbt docs site](https://fivetran.github.io/dbt_sage_intacct_source/).
2122
- These tables are designed to work simultaneously with our [Sage Intacct transformation package](https://github.com/fivetran/dbt_sage_intacct).
@@ -39,7 +40,7 @@ If you are **not** using the [Sage Intacct transformation package](https://githu
3940
```yaml
4041
packages:
4142
- package: fivetran/sage_intacct_source
42-
version: [">=0.4.0", "<0.5.0"] # we recommend using ranges to capture non-breaking changes automatically
43+
version: [">=0.5.0", "<0.6.0"] # we recommend using ranges to capture non-breaking changes automatically
4344
```
4445
### Step 3: Define database and schema variables
4546
By default, this package runs using your destination and the `sage_intacct` schema. If this is not where your Sage Intacct data is (for example, if your Sage Intacct schema is named `sage_intacct_fivetran`), add the following configuration to your root `dbt_project.yml` file:

dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'sage_intacct_source'
2-
version: '0.4.1'
2+
version: '0.5.0'
33
config-version: 2
44
require-dbt-version: [">=1.3.0", "<2.0.0"]
55
models:

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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'sage_intacct_source_integration_tests'
2-
version: '0.4.1'
2+
version: '0.5.0'
33
config-version: 2
44

55
profile: 'integration_tests'
@@ -21,3 +21,6 @@ seeds:
2121
dispatch:
2222
- macro_namespace: dbt_utils
2323
search_order: ['spark_utils', 'dbt_utils']
24+
25+
flags:
26+
send_anonymous_usage_stats: False

models/src_sage_intacct.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ sources:
66
database: "{% if target.type != 'spark' %}{{var('sage_intacct_database', target.database)}}{% endif %}"
77
loader: fivetran
88
loaded_at_field: _fivetran_synced
9-
freshness:
10-
warn_after: {count: 48, period: hour}
11-
error_after: {count: 72, period: hour}
9+
config:
10+
freshness:
11+
warn_after: {count: 48, period: hour}
12+
error_after: {count: 72, period: hour}
1213

1314

1415
tables:
@@ -95,7 +96,8 @@ sources:
9596

9697
- name: gl_account
9798
identifier: "{{ var('sage_intacct_gl_account_identifier', 'gl_account') }}"
98-
freshness: null
99+
config:
100+
freshness: null
99101
description: Records each existing account, with their corresponding categories.
100102
columns:
101103
- name: recordno

0 commit comments

Comments
 (0)