-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 text handling (#781) #1420
Conversation
Fix incorrect maximum text field length on redshift On postgres, pass through text without size information to fix archival of long text fields Add a test that makes sure postgres archives work with very long text entries Fix tests Add a redshift test
6f8ae46
to
08fdcad
Compare
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.
One comment here, but this largely looks great! Approved pending that one change
from dbt.logger import GLOBAL_LOGGER as logger # noqa | ||
|
||
|
||
class RedshiftAdapter(PostgresAdapter): | ||
ConnectionManager = RedshiftConnectionManager | ||
# postgres overrides this, so override the override. | ||
Column = Column |
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.
Is there any merit to making a RedshiftColumn
type that just inherits from Column
? I think that might be a little more clear that the override override
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.
Yeah, I think that's totally reasonable.
|
||
insert into {database}.{schema}.super_long (id, longstring, updated_at) VALUES | ||
(1, 'short', current_timestamp), | ||
(2, repeat('a', 500), current_timestamp); |
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.
TIL!
Fixes #781
Fix incorrect maximum text field length on redshift (255 -> 256)
On postgres, pass through text without size information to fix archival of long text fields
Add a test that makes sure archives work with very long text entries on postgres