Skip to content

Commit

Permalink
dbt-materialize: unblock UUID type usage for data contracts (#23885)
Browse files Browse the repository at this point in the history
  • Loading branch information
morsapaes authored Dec 14, 2023
1 parent 6fe8f84 commit 9f7bb49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions misc/dbt-materialize/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions misc/dbt-materialize/dbt/adapters/materialize/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from typing import Optional

import psycopg2
from psycopg2.extras import register_uuid

import dbt.adapters.postgres.connections
import dbt.exceptions
Expand Down Expand Up @@ -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)


Expand Down

0 comments on commit 9f7bb49

Please sign in to comment.