Skip to content

Commit baf4053

Browse files
joellabesTimoKruthfivetran-joemarkiewiczdataderssean-rose
authored
dbt v1 compat (#453)
* dbt 0.7.4 release (#441) * Update require-dbt-version to be 1.0 * Fix SQL 42000 on Exasol (#420) " SQL-Error [42000]: syntax error, unexpected '*' " If you specify the * in the unioned with their respectiv names <name>.* you do not receive the SQL Error posted above. This should not inflict any further problems since it is redundant for most DBs. * Minor readme link fixes (#431) * minor readme link fixes * changelog addition Co-authored-by: Joel Labes <joel.labes@dbtlabs.com> * 0.7.4 changelog (#432) * Update CHANGELOG.md * Note branch name change * use `limit_zero` macro instead of `limit 0` (#437) * Utils 0.7.4b1 (#433) * Update require-dbt-version to be 1.0 * Fix SQL 42000 on Exasol (#420) " SQL-Error [42000]: syntax error, unexpected '*' " If you specify the * in the unioned with their respectiv names <name>.* you do not receive the SQL Error posted above. This should not inflict any further problems since it is redundant for most DBs. * Minor readme link fixes (#431) * minor readme link fixes * changelog addition Co-authored-by: Joel Labes <joel.labes@dbtlabs.com> * 0.7.4 changelog (#432) * Update CHANGELOG.md * Note branch name change Co-authored-by: Timo Kruth <timo_kruth@gmx.de> Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com> * standard convention * Update integration_tests/tests/jinja_helpers/test_slugify.sql Taking the liberty of committing on your behalf so that the CI job starts again * Change limit_zero to be a macro Co-authored-by: Joel Labes <joel.labes@dbtlabs.com> Co-authored-by: Timo Kruth <timo_kruth@gmx.de> Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com> * Add col_name alias to else state too (#437) * Remove extra semicolon in `insert_by_period` materialization (#439) * Remove extra semicolon in `insert_by_period` materialization. `create_table_as()` generates a SQL statement that already ends with a semicolon, so the extra semicolon after a `create_table_as()` call in the `insert_by_period` materialization ends up being an empty SQL statement, and at least when using Snowflake this causes the dbt run to fail with a "cannot unpack non-iterable NoneType object" error. * Update changelog for PR 439. * Use the relation object passed into get_column_values, instead of making our own (#440) * Use the relation object passed into get_column_values, instead of making our own * Rename variables in get column value test to be clearer * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Timo Kruth <timo_kruth@gmx.de> Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com> Co-authored-by: Anders <swanson.anders@gmail.com> Co-authored-by: Sean Rose <sean.s.rose@gmail.com> * Regression: Correctly handle missing relations in get_column_values (#448) * Create integration test for a dropped relation * Update get_column_values.sql * Swap out adapter call for a good old fashioned drop table * Add missing curlies * what person wrote this code :/ (it was me) * wrap values in quotes * GOOD * bigquery compat (they don't like except) * Backport android url changes from #426 (#452) * Update CHANGELOG.md * Change require-dbt-version, update dbt_project.yml for integration tests proj * Upgrade python version in CI, improve drop relation integration test * Clarify version pinning * Drop support for release candidates of 1.0.0 Co-authored-by: Timo Kruth <timo_kruth@gmx.de> Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com> Co-authored-by: Anders <swanson.anders@gmail.com> Co-authored-by: Sean Rose <sean.s.rose@gmail.com>
1 parent f367880 commit baf4053

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

.circleci/config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55

66
integration-postgres:
77
docker:
8-
- image: circleci/python:3.6.13-stretch
8+
- image: cimg/python:3.9.9
99
- image: circleci/postgres:9.6.5-alpine-ram
1010

1111
steps:
@@ -24,7 +24,7 @@ jobs:
2424

2525
integration-redshift:
2626
docker:
27-
- image: circleci/python:3.6.3-stretch
27+
- image: cimg/python:3.9.9
2828
steps:
2929
- checkout
3030
- run:
@@ -35,7 +35,7 @@ jobs:
3535

3636
integration-snowflake:
3737
docker:
38-
- image: circleci/python:3.6.3-stretch
38+
- image: cimg/python:3.9.9
3939
steps:
4040
- checkout
4141
- run:
@@ -48,7 +48,7 @@ jobs:
4848
environment:
4949
BIGQUERY_SERVICE_KEY_PATH: "/home/circleci/bigquery-service-key.json"
5050
docker:
51-
- image: circleci/python:3.6.3-stretch
51+
- image: cimg/python:3.9.9
5252
steps:
5353
- checkout
5454
- run:

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# dbt-utils v0.8.0
22
## 🚨 Breaking changes
3-
- dbt ONE POINT OH is here! This version of dbt-utils requires `dbt-core ~=1.0.0` (any minor and patch version of v1), which means far less need for compatibility releases in the future.
3+
- dbt ONE POINT OH is here! This version of dbt-utils requires _any_ version (minor and patch) of v1, which means far less need for compatibility releases in the future.
44
- The partition column in the `mutually_exclusive_ranges` test is now always called `partition_by_col`. This enables compatibility with `--store-failures` when multiple columns are concatenated together. If you have models built on top of the failures table, update them to reflect the new column name. ([#423](https://github.com/dbt-labs/dbt-utils/issues/423), [#430](https://github.com/dbt-labs/dbt-utils/pull/430))
55

66
## Contributors:

dbt_project.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: 'dbt_utils'
2-
version: '0.7.0'
2+
version: '0.1.0'
33

4-
require-dbt-version: [">=0.20.0", "<=1.0.0"]
4+
require-dbt-version: [">=1.0.0", "<2.0.0"]
55

66
config-version: 2
77

88
target-path: "target"
9-
clean-targets: ["target", "dbt_modules"]
9+
clean-targets: ["target", "dbt_modules", "dbt_packages"]
1010
macro-paths: ["macros"]
1111
log-path: "logs"

integration_tests/dbt_project.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ profile: 'integration_tests'
88

99
config-version: 2
1010

11-
source-paths: ["models"]
11+
model-paths: ["models"]
1212
analysis-paths: ["analysis"]
1313
test-paths: ["tests"]
14-
data-paths: ["data"]
14+
seed-paths: ["data"]
1515
macro-paths: ["macros"]
1616

1717
target-path: "target" # directory which will store compiled SQL files
1818
clean-targets: # directories to be removed by `dbt clean`
1919
- "target"
2020
- "dbt_modules"
21+
- "dbt_packages"
2122

2223
dispatch:
2324
- macro_namespace: 'dbt_utils'
@@ -56,9 +57,8 @@ seeds:
5657
+schema: events
5758

5859
data_get_column_values_dropped:
59-
# TODO: Ideally this would use the adapter, but it gives a "Tried to drop relation, but its type is null" error.
60-
#+post-hook: "{% do adapter.drop_relation(this) %}"
61-
+post-hook: "drop table {{ this }}"
60+
# this.incorporate() to hardcode the node's type as otherwise dbt doesn't know it yet
61+
+post-hook: "{% do adapter.drop_relation(this.incorporate(type='table')) %}"
6262

6363

6464
schema_tests:

0 commit comments

Comments
 (0)