Skip to content

Commit 71d7721

Browse files
feature/freshness-updates (#29)
* feature/freshness-updates * Update dbt_project.yml * Update CHANGELOG.md Co-authored-by: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> --------- Co-authored-by: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com>
1 parent 1ccf40d commit 71d7721

File tree

10 files changed

+50
-26
lines changed

10 files changed

+50
-26
lines changed

.buildkite/pipeline.yml

Lines changed: 6 additions & 6 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"
@@ -71,4 +71,4 @@ steps:
7171
- "CI_DATABRICKS_DBT_TOKEN"
7272
- "CI_DATABRICKS_DBT_CATALOG"
7373
commands: |
74-
bash .buildkite/scripts/run_models.sh databricks
74+
bash .buildkite/scripts/run_models.sh databricks

.buildkite/scripts/run_models.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ dbt seed --target "$db" --full-refresh
2020
dbt compile --target "$db"
2121
dbt run --target "$db" --full-refresh
2222
dbt test --target "$db"
23+
dbt source freshness --target "$db" || echo "...Only verifying freshness runs…"
2324

2425
dbt run-operation fivetran_utils.drop_schemas_automation --target "$db"

.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: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,33 @@
1-
# dbt_pendo_source version.version
1+
# dbt_pendo_source v0.6.0
2+
3+
[PR #29](https://github.com/fivetran/dbt_pendo_source/pull/29) includes the following updates:
4+
5+
## Breaking Change for dbt Core < 1.9.6
6+
> *Note: This is not relevant to Fivetran Quickstart users.*
7+
8+
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:
9+
10+
```
11+
[WARNING]: Deprecated functionality
12+
Found `freshness` as a top-level property of `pendo` in file
13+
`models/src_pendo.yml`. The `freshness` top-level property should be moved
14+
into the `config` of `pendo`.
15+
```
16+
17+
**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.
18+
19+
If you are using dbt Core < 1.9.6 and want to continue running Pendo Source freshness tests, please elect **one** of the following options:
20+
1. (Recommended) Upgrade to dbt Core >= 1.9.6
21+
2. Do not upgrade your installed version of the `pendo_source` package. Pin your dependency on v0.5.0 in your `packages.yml` file.
22+
3. Utilize a dbt [override](https://docs.getdbt.com/reference/resource-properties/overrides) to overwrite the package's `pendo` 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_pendo.yml` file and add an `overrides: pendo_source` property.
223

324
## Documentation
425
- Corrected references to connectors and connections in the README. ([#27](https://github.com/fivetran/dbt_pendo_source/pull/27))
526

6-
# dbt_pendo_source v0.UPDATE.UPDATE
7-
8-
## Under the Hood:
27+
## Under the Hood:
928
- Incorporated the new `fivetran_utils.drop_schemas_automation` macro into the end of each Buildkite integration test job.
1029
- Updated the pull request [templates](/.github).
30+
- Updates to ensure integration tests use latest version of dbt.
1131

1232
# dbt_pendo_source v0.5.0
1333
PR [#21](https://github.com/fivetran/dbt_pendo_source/pull/21) includes the following updates:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
## What does this dbt package do?
1616
- Materializes [Pendo staging tables](https://fivetran.github.io/dbt_pendo_source/#!/overview/pendo_source/models/?g_v=1) which beverage data in the format described by [this ERD](https://fivetran.com/docs/applications/pendo/#schemainformation). These staging tables clean, test, and prepare your Pendo data from [Fivetran's connector](https://fivetran.com/docs/applications/pendo) for analysis by doing the following:
1717
- Name columns for consistency across all packages and for easier analysis
18-
- Adds freshness tests to source data
18+
- Adds freshness tests to source data. dbt Core >= 1.9.6 is required to run freshness tests out of the box.
1919
- Adds column-level testing where applicable. For example, all primary keys are tested for uniqueness and non-null values.
2020
- Generates a comprehensive data dictionary of your Pendo data through the [dbt docs site](https://fivetran.github.io/dbt_pendo_source/).
2121
- These tables are designed to work simultaneously with our [Pendo transformation package](https://github.com/fivetran/dbt_pendo).
@@ -39,7 +39,7 @@ If you are **not** using the [Pendo transformation package](https://github.com/f
3939
```yaml
4040
packages:
4141
- package: fivetran/pendo_source
42-
version: [">=0.5.0", "<0.6.0"] # we recommend using ranges to capture non-breaking changes automatically
42+
version: [">=0.6.0", "<0.7.0"] # we recommend using ranges to capture non-breaking changes automatically
4343
```
4444

4545
### 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: 'pendo_source'
3-
version: '0.5.0'
3+
version: '0.6.0'
44
require-dbt-version: [">=1.3.0", "<2.0.0"]
55
models:
66
pendo_source:

integration_tests/ci/sample.profiles.yml

Lines changed: 1 addition & 5 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:
@@ -51,4 +47,4 @@ integration_tests:
5147
schema: pendo_source_integration_tests_2001
5248
threads: 2
5349
token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}"
54-
type: databricks
50+
type: databricks

integration_tests/dbt_project.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
config-version: 2
22

33
name: 'pendo_source_integration_tests'
4-
version: '0.5.0'
4+
version: '0.6.0'
55

66
profile: 'integration_tests'
77

@@ -75,4 +75,7 @@ seeds:
7575
last_updated_by_user_id: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"
7676
visitor_history:
7777
+column_types:
78-
id_hash: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"
78+
id_hash: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"
79+
80+
flags:
81+
send_anonymous_usage_stats: False

integration_tests/requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ 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
9+

models/src_pendo.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ 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: 168, period: hour}
10+
11+
config:
12+
freshness:
13+
warn_after: {count: 72, period: hour}
14+
error_after: {count: 168, period: hour}
1415

1516

1617
tables:

0 commit comments

Comments
 (0)