Repository navigation
Deterministically shorten table and column names to 63 characters - #82
Merged
brycekbargar merged 8 commits intoNov 11, 2026
Conversation
brycekbargar
merged commit Nov 11, 2026
4c7e335
into
library-data-platform:release-v5.0.0
5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#79 was reported by the University of Bamberg. Their table prefixing scheme leads to a number of arbitrarily truncated identifiers, including some that cause collisions.
The approach taken here was to to try to
To these ends only the intermediate portions of a table name, not the source or the array property are shortened. This is only applied to tables over the 63 character limit. The "full" table name is now being written to the catalog__t table for reference. Columns are less likely to be truncated but Five Colleges has a couple in Course Reserves. Only the final property name is preserved for Columns, the rest of the intermediate values or shortened incrementally to get to 63 characters. There is no record of the "full" name for columns.
While this PR actually does clean up one of the bigger code issues in the transformation code it introduces some tighter coupling to the behavior/semantics of postgres. This will have to be revisited when Oracle support is added.