-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix: postgres string type #12836
fix: postgres string type #12836
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you adda TODO to remove it after your suggestion is done in dbt side?
Hey @marcosmarxm, just added the TODO, in the meantime i'm going to also submit a PR to DBT repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shrodingers I've got one question just to make sure I've modeled this correctly, but otherwise LGTM!
...tegrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚛
...tegrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql
Outdated
Show resolved
Hide resolved
…late/macros/cross_db_utils/datatypes.sql Added the dbt upgrade condition to TODO Co-authored-by: Edward Gao <[email protected]>
Merging this I'll publish a new normalization version with #12699 |
* fix: postgres string type * feat: added TODO for removal * fix: better comment style * Update airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql Added the dbt upgrade condition to TODO Co-authored-by: Edward Gao <[email protected]> Co-authored-by: Edward Gao <[email protected]>
What
Solves an issue with normalization on incremental sync on postgres destination when adding some columns after initial full refresh sync which type infers to string and whose length > 256
These columns were created with a 256 columns limit due to a DBT behaviour (already opened an issue here. They have something coming out about that in dbt_utils, but in the meantime I think it is better to override the type_string macro to use text instead of varchar (text is correctly handled by dbt)
How
Added an override on the type_string macro for postgres in normalization macros
🚨 User Impact 🚨
No breaking change, except the fact that string columns will now have type text instead of varchar
Linked to this Issue for more context