-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Register Postgres UUID and CIDR datatypes when creating a connection #8357
Conversation
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @gmontanola |
Some points:
I'm inclined to just make this simpler and call 👉 What do you think? Can we make this always-on or should we keep this as adapter configuration? |
Well, I'll make this simpler since using this inside credentials won't work 😄 (it was obvious, duh) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main dbt-labs/dbt-core#8357 +/- ##
==========================================
- Coverage 86.23% 83.12% -3.12%
==========================================
Files 174 174
Lines 25518 25529 +11
==========================================
- Hits 22006 21220 -786
- Misses 3512 4309 +797
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
If we're going to say that dbt-postgres data contracts support something I think we want to test the integration of psycopg2 and data contracts
I wonder if we can turn this on if needed (i.e. a callback function if a data contract specifies these types). Not saying this needs to be a blocker since we can probably keep it on by default |
Assumptionslmk if i'm wrong about any of the following
questions
|
I'll look into adding some tests then.
Nice question. I think a weird exception will appear but I'll test it using an older PG version. Then I can try/except graciously and emit a log message in case of failure. I'm a bit swamped right now but I'll try to improve this ASAP. |
Hi! I just wanted to note here that I ran into the same issue with postgres's |
Just wanted to come here and say thank you! Your PR fixed my problem with snowplow + dbt + uuid. Thanks ! |
Hi, would appreciate merging this PR. I have exactly the same issue to @mowsen with snowplow + dbt + uuid running on postgres. Installing dbt from my fork just to have this fixed is quite tedious. Thank you. |
Just for the sake of completeness, this has been fixed by this PR. I tested it in dbt-core version 1.7.10 and it works. Thank you. |
Thanks for taking the time to open this PR @gmontanola! Since opening, we've decoupled dbt Adapters from dbt Core, and this code now lives in a separate repo: dbt-postgres. A consequence of the decoupling is that PR can't be merged anymore as is, so we're closing it. For more context see #9171. The linked issue has already been transferred. Please don't hesitate to re-open your proposed code changes within this PR in the dbt-postgres repo. |
resolves dbt-labs/dbt-postgres#54
docs dbt-labs/docs.getdbt.com/#
Problem
Contracts checks for data types and when it finds stuff like UUID it fails because it's not registered by default.
Solution
Registering some extra data types - UUID and IP ADDR
Checklist