Skip to content

Commit

Permalink
Upgrade project to support dbt 0.1.x (#127)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
clausherther authored Dec 5, 2021
1 parent 28d47f7 commit d7f9860
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

target/
dbt_modules/
dbt_packages/
logs/
.python-version
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<img src="expectations.gif"/>

**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

Expand All @@ -15,22 +15,22 @@ Include in `packages.yml`
```yaml
packages:
- package: calogica/dbt_expectations
version: [">=0.4.0", "<0.5.0"]
version: [">=0.5.0", "<0.6.0"]
# <see https://github.com/calogica/dbt-expectations/releases/latest> for the latest version tag
```

For latest release, see [https://github.com/calogica/dbt-expectations/releases](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: <latest or range>
```
Expand Down
6 changes: 3 additions & 3 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 1 addition & 3 deletions integration_tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- package: calogica/dbt_date
version: [">=0.4.0", "<0.5.0"]
version: [">=0.5.0", "<0.6.0"]

0 comments on commit d7f9860

Please sign in to comment.