From d7f98601811db2532510a70103f66f9784bc979c Mon Sep 17 00:00:00 2001 From: Claus Herther Date: Sun, 5 Dec 2021 09:07:55 -0800 Subject: [PATCH] Upgrade project to support dbt 0.1.x (#127) * Remove duplicate test * Update to exclude new pacakge folder * Update paths * Update test.sh to use dbt build * update gitignore * Upgrade project to support dbt 0.1.x * Require dbt-date >= 0.5.0 * Enable support for dbt 1.x (#128) * rebase * Update paths * Update test.sh to use dbt build * update gitignore * rebase * Require dbt-date >= 0.5.0 * Update README --- .gitignore | 1 - README.md | 8 ++++---- dbt_project.yml | 6 +++--- integration_tests/dbt_project.yml | 4 ++-- integration_tests/test.sh | 4 +--- packages.yml | 2 +- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 931c43e..83beff7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ target/ -dbt_modules/ dbt_packages/ logs/ .python-version diff --git a/README.md b/README.md index 43f5ed0..ff2e806 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -**dbt-expectations** is an extension package for [**dbt**](https://github.com/fishtown-analytics/dbt), inspired by the [Great Expectations package for Python](https://greatexpectations.io/). The intent is to allow dbt users to deploy GE-like tests in their data warehouse directly from dbt, vs having to add another integration with their data warehouse. +**dbt-expectations** is an extension package for [**dbt**](https://github.com/dbt-labs/dbt), inspired by the [Great Expectations package for Python](https://greatexpectations.io/). The intent is to allow dbt users to deploy GE-like tests in their data warehouse directly from dbt, vs having to add another integration with their data warehouse. ## Install @@ -15,7 +15,7 @@ Include in `packages.yml` ```yaml packages: - package: calogica/dbt_expectations - version: [">=0.4.0", "<0.5.0"] + version: [">=0.5.0", "<0.6.0"] # for the latest version tag ``` @@ -23,14 +23,14 @@ For latest release, see [https://github.com/calogica/dbt-expectations/releases]( ### Dependencies -This package includes a reference to [**dbt-date**](https://github.com/calogica/dbt-date) which in turn references [**dbt-utils**](https://github.com/fishtown-analytics/dbt-utils) so there's no need to also import dbt-utils in your local project. +This package includes a reference to [**dbt-date**](https://github.com/calogica/dbt-date) which in turn references [**dbt-utils**](https://github.com/dbt-labs/dbt-utils) so there's no need to also import dbt-utils in your local project. Note: we no longer include `spark_utils` in this package to avoid versioning conflicts. If you are running this package on non-core platforms (outside of Snowflake, BigQuery, Redshift, Postgres), you will need to use a package like `spark_utils` to shim macros. For example, in `packages.yml`, you will need to include the relevant package: ```yaml - - package: fishtown-analytics/spark_utils + - package: dbt-labs/spark_utils version: ``` diff --git a/dbt_project.yml b/dbt_project.yml index b0f0027..115d8b8 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -3,13 +3,13 @@ # and underscores. A good package name should reflect your organization's # name or the intended use of these models name: 'dbt_expectations' -version: '0.4.0' +version: '0.5.0' -require-dbt-version: [">=0.20.0", "<1.1.0"] +require-dbt-version: [">=1.0.0", "<2.0.0"] config-version: 2 target-path: "target" -clean-targets: ["target", "dbt_modules", "dbt_packages"] +clean-targets: ["target", "dbt_packages"] macro-paths: ["macros"] log-path: "logs" diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 411f218..5da295b 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -6,10 +6,10 @@ profile: 'integration_tests' config-version: 2 -source-paths: ["models"] +model-paths: ["models"] analysis-paths: ["analysis"] test-paths: ["tests"] -data-paths: ["data"] +seed-paths: ["data"] macro-paths: ["macros"] target-path: "target" diff --git a/integration_tests/test.sh b/integration_tests/test.sh index 299946b..790660c 100644 --- a/integration_tests/test.sh +++ b/integration_tests/test.sh @@ -5,9 +5,7 @@ i=1; for t in "$@" do - dbt seed -t $t && - dbt run -t $t && - dbt test -t $t + dbt build -t $t done diff --git a/packages.yml b/packages.yml index 0adad3a..fa90cb4 100644 --- a/packages.yml +++ b/packages.yml @@ -1,3 +1,3 @@ packages: - package: calogica/dbt_date - version: [">=0.4.0", "<0.5.0"] + version: [">=0.5.0", "<0.6.0"]