diff --git a/misc/dbt-materialize/CHANGELOG.md b/misc/dbt-materialize/CHANGELOG.md index 4ed74fec5adab..9f74a00775a5e 100644 --- a/misc/dbt-materialize/CHANGELOG.md +++ b/misc/dbt-materialize/CHANGELOG.md @@ -5,6 +5,10 @@ * Remove the dependency of data contracts pre-flight checks on the existence of the pre-installed `default` cluster. Fixes [#23600](https://github.com/MaterializeInc/materialize/issues/23600). +* Work around [dbt-core #8353](https://github.com/dbt-labs/dbt-core/issues/8353) + while a permanent fix doesn't land in dbt Core to unblock users using UUID + types. + ## 1.7.0 - 2023-11-20 * Support specifying the materialization type used to store test failures via diff --git a/misc/dbt-materialize/dbt/adapters/materialize/connections.py b/misc/dbt-materialize/dbt/adapters/materialize/connections.py index 4a840a6927b6e..54563de538885 100644 --- a/misc/dbt-materialize/dbt/adapters/materialize/connections.py +++ b/misc/dbt-materialize/dbt/adapters/materialize/connections.py @@ -18,6 +18,7 @@ from typing import Optional import psycopg2 +from psycopg2.extras import register_uuid import dbt.adapters.postgres.connections import dbt.exceptions @@ -48,6 +49,11 @@ def connect(**kwargs): *(kwargs.get("options") or []), ] kwargs["options"] = " ".join(options) + + # NOTE(morsapaes): work around dbt-core #8353 while #8900 doesn't land to + # unblock users using UUID types. + register_uuid() + return _connect(**kwargs)