-
Notifications
You must be signed in to change notification settings - Fork 318
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
Add migration script to remove size limits from namespaces, dataset n… #1925
Conversation
…ames, and source connection urls Signed-off-by: Michael Collado <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1925 +/- ##
=========================================
Coverage 77.90% 77.90%
Complexity 937 937
=========================================
Files 193 193
Lines 5218 5218
Branches 418 418
=========================================
Hits 4065 4065
Misses 706 706
Partials 447 447 📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
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.
👍
ALTER TABLE dataset_versions ALTER COLUMN namespace_name TYPE VARCHAR; | ||
ALTER TABLE dataset_versions ALTER COLUMN dataset_name TYPE VARCHAR; | ||
ALTER TABLE datasets ALTER COLUMN name TYPE VARCHAR; | ||
ALTER TABLE datasets ALTER COLUMN physical_name TYPE VARCHAR; | ||
ALTER TABLE datasets ALTER COLUMN source_name TYPE VARCHAR; | ||
ALTER TABLE namespaces ALTER COLUMN name TYPE VARCHAR; | ||
ALTER TABLE runs ALTER COLUMN external_id TYPE VARCHAR; | ||
ALTER TABLE sources ALTER COLUMN name TYPE VARCHAR; | ||
ALTER TABLE sources ALTER COLUMN connection_url TYPE VARCHAR; | ||
ALTER TABLE tags ALTER COLUMN name TYPE VARCHAR; |
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.
So these are to change from VARCHAR(256) to VARCHAR, right?
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.
yep
Problem
Several columns in the database are restricted to 255 characters, perhaps without strong justification. Several of these cause problems, including namespaces, in #1758, as well as the
connection_url
when storing some Snowflake tables (the connection URLs contain a lot of extra parameters which aren't always scrubbed before sending the OpenLineage events). If there isn't a strong reason for restricting these columns, the default restriction on VARCHARs will work just as well with no performance penalty.Closes: #1758
Solution
Remove the size restriction on various VARCHAR types
Checklist
CHANGELOG.md
with details about your change under the "Unreleased" section (if relevant, depending on the change, this may not be necessary).sql
database schema migration according to Flyway's naming convention (if relevant)