From fa9b4d5f51c114700a5c771bc9f4a7b6d5b6f24b Mon Sep 17 00:00:00 2001 From: Przemek Denkiewicz Date: Tue, 5 Oct 2021 11:25:24 +0200 Subject: [PATCH 1/4] Bump dbt version to 0.21.0 --- .bumpversion-dbt.cfg | 2 +- .bumpversion.cfg | 2 +- dbt/adapters/trino/__version__.py | 2 +- docker/dbt/Dockerfile | 2 +- requirements.txt | 2 +- setup.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.bumpversion-dbt.cfg b/.bumpversion-dbt.cfg index 94aebf77..f8ad313f 100644 --- a/.bumpversion-dbt.cfg +++ b/.bumpversion-dbt.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.20.2 +current_version = 0.21.0 parse = (?P\d+) \.(?P\d+) \.(?P\d+) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 00c82f8b..ef6c3d17 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.20.2 +current_version = 0.21.0 parse = (?P\d+) \.(?P\d+) \.(?P\d+) diff --git a/dbt/adapters/trino/__version__.py b/dbt/adapters/trino/__version__.py index 4d785f00..17fea6d1 100644 --- a/dbt/adapters/trino/__version__.py +++ b/dbt/adapters/trino/__version__.py @@ -1 +1 @@ -version = '0.20.2' +version = '0.21.0' diff --git a/docker/dbt/Dockerfile b/docker/dbt/Dockerfile index 0275f97c..bb6b8ef7 100644 --- a/docker/dbt/Dockerfile +++ b/docker/dbt/Dockerfile @@ -1,4 +1,4 @@ -FROM fishtownanalytics/dbt:0.20.2 +FROM fishtownanalytics/dbt:0.21.0 USER root ENV DBT_DIR /opt/dbt-trino diff --git a/requirements.txt b/requirements.txt index c5e376f2..eaf3331c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -dbt-core==0.20.2 +dbt-core==0.21.0 trino==0.306.0 diff --git a/setup.py b/setup.py index 67e75c2d..19d72202 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ def _dbt_trino_version(): package_version = _dbt_trino_version() description = """The trino adapter plugin for dbt (data build tool)""" -dbt_version = '0.20.2' +dbt_version = '0.21.0' # the package version should be the dbt version, with maybe some things on the # ends of it. (0.19.1 vs 0.19.1a1, 0.19.1.1, ...) if not package_version.startswith(dbt_version): From c222332637e22a333f0e376f3044672f0d04a030 Mon Sep 17 00:00:00 2001 From: Przemek Denkiewicz Date: Tue, 5 Oct 2021 11:27:10 +0200 Subject: [PATCH 2/4] Update repository URL --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 19d72202..80e480bf 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ def _dbt_trino_version(): author='findinpath', author_email='findinpath@gmail.com', - url='https://github.com/findinpath/dbt-trino', + url='https://github.com/starburstdata/dbt-trino', packages=find_namespace_packages(include=['dbt', 'dbt.*']), package_data={ From 21ae59f9fa03ba5f61712f72d178f1652ab4aa9b Mon Sep 17 00:00:00 2001 From: Przemek Denkiewicz Date: Tue, 5 Oct 2021 12:20:22 +0200 Subject: [PATCH 3/4] Drop trino__load_csv_rows macro dbt 0.21.0 introduced changes which dropped basic_load_csv_rows https://github.com/dbt-labs/dbt/pull/3623. Now it's able to use the default macro default__load_csv_rows --- dbt/include/trino/macros/adapters.sql | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dbt/include/trino/macros/adapters.sql b/dbt/include/trino/macros/adapters.sql index e0d89a11..35caba7a 100644 --- a/dbt/include/trino/macros/adapters.sql +++ b/dbt/include/trino/macros/adapters.sql @@ -128,7 +128,7 @@ {%- endmacro %} -{# On Trino, 'cascade' isn't supported so we have to manually cascade. #} +{# On Trino, 'cascade' is not supported so we have to manually cascade. #} {% macro trino__drop_schema(relation) -%} {% for row in list_relations_without_caching(relation) %} {% set rel_db = row[0] %} @@ -151,11 +151,6 @@ {% endmacro %} -{% macro trino__load_csv_rows(model, agate_table) %} - {{ return(basic_load_csv_rows(model, 1000, agate_table)) }} -{% endmacro %} - - {% macro trino__list_schemas(database) -%} {% call statement('list_schemas', fetch_result=True, auto_begin=False) %} select distinct schema_name From c3f12e41ff0654e7c05cb12a97df2653dcfec0e8 Mon Sep 17 00:00:00 2001 From: Przemek Denkiewicz Date: Thu, 7 Oct 2021 10:48:00 +0200 Subject: [PATCH 4/4] Bump Trino version to 363 --- README.md | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 588e482b..32154c7b 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ This repository represents a fork of the [dbt-presto](https://github.com/dbt-lab ### Compatibility -This dbt plugin has been tested against `trino` version `362`. +This dbt plugin has been tested against `trino` version `363`. ### Installation diff --git a/docker-compose.yml b/docker-compose.yml index 51698198..95e61063 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: trino: ports: - "8080:8080" - image: "trinodb/trino:362" + image: "trinodb/trino:363" volumes: - ./docker/trino/etc:/usr/lib/trino/etc:ro - ./docker/trino/catalog:/etc/trino/catalog