diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 281f1d4..2603602 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -3,7 +3,7 @@ steps: key: "run-dbt-postgres" plugins: - docker#v3.13.0: - image: "python:3.8" + image: "python:3.10.13" shell: [ "/bin/bash", "-e", "-c" ] environment: - "BASH_ENV=/tmp/.bashrc" @@ -18,7 +18,7 @@ steps: key: "run_dbt_snowflake" plugins: - docker#v3.13.0: - image: "python:3.8" + image: "python:3.10.13" shell: [ "/bin/bash", "-e", "-c" ] environment: - "BASH_ENV=/tmp/.bashrc" @@ -35,7 +35,7 @@ steps: key: "run_dbt_bigquery" plugins: - docker#v3.13.0: - image: "python:3.8" + image: "python:3.10.13" shell: [ "/bin/bash", "-e", "-c" ] environment: - "BASH_ENV=/tmp/.bashrc" @@ -47,7 +47,7 @@ steps: key: "run_dbt_redshift" plugins: - docker#v3.13.0: - image: "python:3.8" + image: "python:3.10.13" shell: [ "/bin/bash", "-e", "-c" ] environment: - "BASH_ENV=/tmp/.bashrc" @@ -62,7 +62,7 @@ steps: key: "run_dbt_databricks" plugins: - docker#v3.13.0: - image: "python:3.8" + image: "python:3.10.13" shell: [ "/bin/bash", "-e", "-c" ] environment: - "BASH_ENV=/tmp/.bashrc" diff --git a/.buildkite/scripts/run_models.sh b/.buildkite/scripts/run_models.sh index 5d3804e..8da715a 100644 --- a/.buildkite/scripts/run_models.sh +++ b/.buildkite/scripts/run_models.sh @@ -17,6 +17,7 @@ echo `pwd` cd integration_tests dbt deps dbt seed --target "$db" --full-refresh +dbt source freshness --target "$db" || echo "...Only verifying freshness runs…" dbt run --target "$db" --full-refresh dbt test --target "$db" dbt run --vars '{apple_store__using_subscriptions: true}' --target "$db" --full-refresh diff --git a/.gitignore b/.gitignore index 49f147c..ba69d74 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ target/ dbt_packages/ logs/ +env/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 30fce6d..c8f97fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,29 @@ +# dbt_apple_store_source v0.6.0 + +[PR #21](https://github.com/fivetran/dbt_apple_store_source/pull/21) includes the following updates: + +## Breaking Change for dbt Core < 1.9.6 +> *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.6 may have received: + +``` +[WARNING]: Deprecated functionality +Found `freshness` as a top-level property of `apple_store` in file +`models/src_apple_store.yml`. The `freshness` top-level property should be moved +into the `config` of `apple_store`. +``` + +**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. + +If you are using dbt Core < 1.9.6 and want to continue running Apple Store freshness tests, please elect **one** of the following options: + 1. (Recommended) Upgrade to dbt Core >= 1.9.6 + 2. Do not upgrade your installed version of the `apple_store_source` package. Pin your dependency on v0.5.1 in your `packages.yml` file. + 3. Utilize a dbt [override](https://docs.getdbt.com/reference/resource-properties/overrides) to overwrite the package's `apple_store` 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_apple_store.yml` file and add an `overrides: apple_store_source` property. + +## Under the Hood +- Updates to ensure integration tests use latest version of dbt. + # dbt_apple_store_source v0.5.1 This release includes the following updates: diff --git a/README.md b/README.md index 3d7f9d5..5fa5522 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ - Materializes [Apple App Store staging tables](https://fivetran.github.io/dbt_apple_store_source/#!/overview/github_source/models/?g_v=1) which leverage data in the format described by [this ERD](https://fivetran.com/docs/connectors/applications/apple-app-store#schemainformation). These staging tables clean, test, and prepare your Apple App Store data from [Fivetran's connector](https://fivetran.com/docs/applications/apple-app-store) 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.6 is required to run freshness tests out of the box. - 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 Apple App Store data through the [dbt docs site](https://fivetran.github.io/dbt_apple_store_source/). - These tables are designed to work simultaneously with our [Apple App Store transformation package](https://github.com/fivetran/dbt_apple_store). diff --git a/dbt_project.yml b/dbt_project.yml index 8560383..1cca560 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'apple_store_source' -version: '0.5.1' +version: '0.6.0' config-version: 2 require-dbt-version: [">=1.3.0", "<2.0.0"] vars: diff --git a/integration_tests/ci/sample.profiles.yml b/integration_tests/ci/sample.profiles.yml index 50393ea..2715cd4 100644 --- a/integration_tests/ci/sample.profiles.yml +++ b/integration_tests/ci/sample.profiles.yml @@ -2,10 +2,6 @@ # HEY! This file is used in the dbt package integrations tests with Buildkite. # You should __NEVER__ check credentials into version control. Thanks for reading :) -config: - send_anonymous_usage_stats: False - use_colors: True - integration_tests: target: redshift outputs: diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 0e859d4..cc89e14 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,7 +1,7 @@ config-version: 2 name: 'apple_store_source_integration_tests' -version: '0.5.1' +version: '0.6.0' profile: 'integration_tests' @@ -32,4 +32,7 @@ seeds: dispatch: - macro_namespace: dbt_utils - search_order: ['spark_utils', 'dbt_utils'] \ No newline at end of file + search_order: ['spark_utils', 'dbt_utils'] + +flags: + send_anonymous_usage_stats: False diff --git a/models/src_apple_store.yml b/models/src_apple_store.yml index 9bf38f3..dfd2cbf 100644 --- a/models/src_apple_store.yml +++ b/models/src_apple_store.yml @@ -7,9 +7,10 @@ sources: loader: Fivetran loaded_at_field: _fivetran_synced - freshness: - warn_after: {count: 48, period: hour} - error_after: {count: 168, period: hour} + config: + freshness: + warn_after: {count: 48, period: hour} + error_after: {count: 168, period: hour} tables: - name: app_store_app