-
Notifications
You must be signed in to change notification settings - Fork 31
feature/update-freshness-config #95
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,3 +1,25 @@ | ||||||
| # dbt_stripe_source v0.15.0 | ||||||
|
|
||||||
| [PR #95](https://github.com/fivetran/dbt_stripe_source/pull/95) includes the following updates: | ||||||
|
|
||||||
| ## Breaking Change for dbt Core < 1.9.5 | ||||||
| > *Note: This is not relevant to Fivetran Quickstart users.* | ||||||
| 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.5 may have received: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| ``` | ||||||
| [WARNING]: Deprecated functionality | ||||||
| Found `freshness` as a top-level property of `stripe` in file | ||||||
| `models/src_stripe.yml`. The `freshness` top-level property should be moved | ||||||
| into the `config` of `stripe`. | ||||||
| ``` | ||||||
|
|
||||||
| **IMPORTANT:** Users running dbt Core < 1.9.5 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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| If you are using dbt Core < 1.9.5 and want to continue running Stripe freshness tests, please elect **one** of the following options: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| 1. (Recommended) Upgrade to dbt Core >= 1.9.5 | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| 2. Do not upgrade your installed version of the `stripe_source` package. Pin your dependency on v0.14.2 in your `packages.yml` file. | ||||||
| 3. Utilize a dbt [override](https://docs.getdbt.com/reference/resource-properties/overrides) to overwrite the package's `stripe` source and apply freshness via the [old](https://github.com/fivetran/dbt_stripe_source/blob/v0.14.2/models/src_stripe.yml#L10-L12) top-level property route. This will require you to copy and paste the entirety of the `src_stripe.yml` [file](https://github.com/fivetran/dbt_stripe_source/blob/v0.14.2/models/src_stripe.yml) and add an `overrides: stripe_source` property. | ||||||
|
|
||||||
| # dbt_stripe_source v0.14.2 | ||||||
|
|
||||||
| ## Under the Hood | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,6 +20,7 @@ | |||||
| - Materializes [Stripe staging tables](https://fivetran.github.io/dbt_stripe_source/#!/overview/stripe_source/models/?g_v=1&g_e=seeds) which leverage data in the format described by [this ERD](https://fivetran.com/docs/applications/stripe/#schemainformation). These staging tables clean, test, and prepare your Stripe data from [Fivetran's connector](https://fivetran.com/docs/applications/stripe) for analysis by doing the following: | ||||||
| - Name columns for consistency across all packages and for easier analysis | ||||||
| - Adds freshness tests to source data | ||||||
| > dbt Core >= 1.9.5 is required to run freshness tests out of the box. See other options [here](https://github.com/fivetran/dbt_stripe_source/blob/main/CHANGELOG.md#breaking-change-for-dbt-core--195). | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - Adds column-level testing where applicable. For example, all primary keys are tested for uniqueness and non-null values. | ||||||
| - Generates a comprehensive data dictionary of your Stripe data through the [dbt docs site](https://fivetran.github.io/dbt_stripe_source/). | ||||||
| - These tables are designed to work simultaneously with our [Stripe transformation package](https://github.com/fivetran/dbt_stripe). | ||||||
|
|
@@ -46,7 +47,7 @@ If you are **not** using the [Stripe transformation package](https://github.com | |||||
| ```yaml | ||||||
| packages: | ||||||
| - package: fivetran/stripe_source | ||||||
| version: [">=0.14.0", "<0.15.0"] | ||||||
| version: [">=0.15.0", "<0.16.0"] | ||||||
| ``` | ||||||
| ### Step 3: Define database and schema variables | ||||||
| By default, this package runs using your destination and the `stripe` schema. If this is not where your stripe data is (for example, if your stripe schema is named `stripe_fivetran`), add the following configuration to your root `dbt_project.yml` file: | ||||||
|
|
||||||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,9 +7,10 @@ sources: | |
| loader: fivetran | ||
| loaded_at_field: _fivetran_synced | ||
|
|
||
| freshness: | ||
| warn_after: { count: 72, period: hour } | ||
| error_after: { count: 168, period: hour } | ||
| config: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gotta update the table-level |
||
| freshness: | ||
| warn_after: { count: 72, period: hour } | ||
| error_after: { count: 168, period: hour } | ||
|
|
||
| tables: | ||
| - name: balance_transaction | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.