From 23cdfd8975ad3fa8c7d32d9ff91818635d33f342 Mon Sep 17 00:00:00 2001 From: Kyle Wigley Date: Mon, 4 Jan 2021 10:47:14 -0500 Subject: [PATCH 1/3] bump dbt --- .bumpversion-dbt.cfg | 2 +- requirements.txt | 2 +- setup.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bumpversion-dbt.cfg b/.bumpversion-dbt.cfg index 8678c9f8f..be9371e63 100644 --- a/.bumpversion-dbt.cfg +++ b/.bumpversion-dbt.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.18.1 +current_version = 0.19.0rc1 parse = (?P\d+) \.(?P\d+) \.(?P\d+) diff --git a/requirements.txt b/requirements.txt index 619fc530d..b323e2090 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -dbt-core==0.18.1 +dbt-core==0.19.0rc1 PyHive[hive]>=0.6.0,<0.7.0 pyodbc>=4.0.30 sqlparams>=3.0.0 diff --git a/setup.py b/setup.py index d6be6a9f3..af036146e 100644 --- a/setup.py +++ b/setup.py @@ -28,9 +28,9 @@ def _dbt_spark_version(): package_version = _dbt_spark_version() description = """The SparkSQL plugin for dbt (data build tool)""" -dbt_version = '0.18.1' +dbt_version = '0.19.0rc1' # the package version should be the dbt version, with maybe some things on the -# ends of it. (0.18.1 vs 0.18.1a1, 0.18.1.1, ...) +# ends of it. (0.19.0rc1 vs 0.19.0rc1a1, 0.19.0rc1.1, ...) if not package_version.startswith(dbt_version): raise ValueError( f'Invalid setup.py: package_version={package_version} must start with ' From 0b914d7158dd2a21beb7e4157e9ed952c5fa569a Mon Sep 17 00:00:00 2001 From: Kyle Wigley Date: Mon, 4 Jan 2021 12:05:02 -0500 Subject: [PATCH 2/3] dbt 0.19.0rc1 updates --- dbt/adapters/spark/connections.py | 2 +- test/unit/test_adapter.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dbt/adapters/spark/connections.py b/dbt/adapters/spark/connections.py index 11592d661..76e574df3 100644 --- a/dbt/adapters/spark/connections.py +++ b/dbt/adapters/spark/connections.py @@ -273,7 +273,7 @@ def cancel(self, connection): connection.handle.cancel() @classmethod - def get_status(cls, cursor): + def get_response(cls, cursor): return 'OK' # No transactions on Spark.... diff --git a/test/unit/test_adapter.py b/test/unit/test_adapter.py index 2cbd7810d..30f00821f 100644 --- a/test/unit/test_adapter.py +++ b/test/unit/test_adapter.py @@ -22,7 +22,8 @@ def setUp(self): 'quoting': { 'identifier': False, 'schema': False, - } + }, + 'config-version': 2 } def _get_target_http(self, project): From 0a900d0ce28e447295af71194bfcf55a3b1f7153 Mon Sep 17 00:00:00 2001 From: Kyle Wigley Date: Thu, 7 Jan 2021 00:10:50 -0500 Subject: [PATCH 3/3] update integration tests --- dbt/adapters/spark/__version__.py | 2 +- dbt/include/spark/macros/materializations/seed.sql | 2 +- dbt/include/spark/macros/materializations/snapshot.sql | 2 +- dev_requirements.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dbt/adapters/spark/__version__.py b/dbt/adapters/spark/__version__.py index ff9d7d6e0..1b44f8610 100644 --- a/dbt/adapters/spark/__version__.py +++ b/dbt/adapters/spark/__version__.py @@ -1 +1 @@ -version = "0.18.1.1" +version = "0.19.0rc1" diff --git a/dbt/include/spark/macros/materializations/seed.sql b/dbt/include/spark/macros/materializations/seed.sql index 1f088e830..c857f013b 100644 --- a/dbt/include/spark/macros/materializations/seed.sql +++ b/dbt/include/spark/macros/materializations/seed.sql @@ -80,7 +80,7 @@ {%- set target_relation = api.Relation.create(database=database, schema=schema, identifier=identifier, type='table') -%} {%- set agate_table = load_agate_table() -%} - {%- do store_result('agate_table', status='OK', agate_table=agate_table) -%} + {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%} {{ run_hooks(pre_hooks, inside_transaction=False) }} diff --git a/dbt/include/spark/macros/materializations/snapshot.sql b/dbt/include/spark/macros/materializations/snapshot.sql index cd43253e1..04ee1f484 100644 --- a/dbt/include/spark/macros/materializations/snapshot.sql +++ b/dbt/include/spark/macros/materializations/snapshot.sql @@ -116,7 +116,7 @@ {% if not target_relation_exists %} - {% set build_sql = build_snapshot_table(strategy, model['injected_sql']) %} + {% set build_sql = build_snapshot_table(strategy, model['compiled_sql']) %} {% set final_sql = create_table_as(False, target_relation, build_sql) %} {% else %} diff --git a/dev_requirements.txt b/dev_requirements.txt index c657c54fa..d662a12b5 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -10,6 +10,6 @@ pytest-xdist>=2.1.0,<3 flaky>=3.5.3,<4 # Test requirements -pytest-dbt-adapter==0.3.0 +pytest-dbt-adapter==0.4.0 sasl==0.2.1 thrift_sasl==0.4.1