Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbt-materialize: unblock UUID type usage for data contracts #23885

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

morsapaes
Copy link
Contributor

Users using UUID types with data contracts currently run into the following error:

❯ dbt run
05:12:28  Running with dbt=1.7.3
05:12:28  Registered adapter: materialize=1.7.0
05:12:28  Found 2 tests, 4 seeds, 1 model, 2 sources, 0 exposures, 0 metrics, 426 macros, 0 groups, 0 semantic models
05:12:28
05:12:31  Concurrency: 1 threads (target='dev')
05:12:31
05:12:31  1 of 1 START sql materialized_view model public.content_tags_model ............. [RUN]
05:12:32  Unhandled error while executing
2950
05:12:32  1 of 1 ERROR creating sql materialized_view model public.content_tags_model .... [ERROR in 1.12s]
05:12:32
05:12:32  Finished running 1 materialized_view model in 0 hours 0 minutes and 4.58 seconds (4.58s).
05:12:32
05:12:32  Completed with 1 error and 0 warnings:
05:12:32
05:12:32    2950
05:12:32
05:12:32  Done. PASS=0 WARN=0 ERROR=1 SKIP=0 TOTAL=1

This is a known limitation in dbt-core (#8353) that has been generically fixed, but is still pending an adapter-specific fix. Since it won't be uncommon for users to need this, patching dbt-materialize with a workaround that calls register_uuid() on connection, to avoid requiring users to define a type mapping macro.

Based on dbt-core dbt-labs/dbt-core#8357.

@morsapaes morsapaes requested a review from a team December 14, 2023 12:48
@morsapaes morsapaes merged commit 9f7bb49 into MaterializeInc:main Dec 14, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants