-
Notifications
You must be signed in to change notification settings - Fork 13
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
[CT-2957] [Bug] Cannot specify column contract of type UUID in PostgreSQL with DBT 1.5.3 #54
Comments
I just faced this error! I'll submit a PR ASAP |
Thank you for reporting this @epgui and for raising a PR @gmontanola 🙌 |
Just wanted to note that I just ran into this exact error - "Unhandled error while executing" for enforcing a model contract with uuid columns. Example yaml:
I also ran into this issue with the |
This PR is important as it solves an error with the snowplow_web package. With the current adapter, you will receive a 2950 Runtime Error. Can confirm that this PR resolves the problem. |
@dbeatty10 do you know when the PR for this is likely to be merged please? This is an open issue for us and I'd prefer not to have to alter all our packages to put a workaround in for this. For the record we don't currently use contracts or even specify the column type in the table that is erroring, but just having a EDIT: |
@rlh1994 Thanks for opening dbt-labs/dbt-core#8877! It does a nice job of explaining the general case of unknown data types and laying out options. Since it is more broad in impact, we are likely to prioritize dbt-labs/dbt-core#8877 over #54. Not to say that both can't be done, just that we'd likely approach them in that order. |
Is this a new bug in dbt-core?
Current Behavior
I have a source table with the following DDL, populated with three records:
I have created the following staging model:
I have configured it this way:
When I run DBT, I get the following error, with no extra context and no other information:
It looks like
2950
is theoid
of the UUID data type in postgres: https://github.com/postgres/postgres/blob/5e0c761d0a13c7b4f7c5de618ac38560d74d74d0/src/include/catalog/pg_type.dat#L403If I cast all my UUIDs to TEXT, and change my contracts to TEXT instead of UUID, the error disappears. Without the contracts, the model runs just fine and the UUID type works as expected.
Expected Behavior
See previous section
Steps To Reproduce
See previous section
Relevant log output
2023-08-10 12:57:36 15:57:36 Unhandled error while executing 2023-08-10 12:57:36 2950
No further context or any other information is output with this error. It looks like
2950
is theoid
of the UUID data type in postgres: https://github.com/postgres/postgres/blob/5e0c761d0a13c7b4f7c5de618ac38560d74d74d0/src/include/catalog/pg_type.dat#L403Environment
Which database adapter are you using with dbt?
postgres
Additional Context
No response
The text was updated successfully, but these errors were encountered: