-
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
Check Postgres relation name lengths and throw error when over 63 #2727
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, don't hesitate to ping @drewbanin. CLA has not been signed by users: @gshank |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
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.
This looks good! I've added some feedback inline on particular things.
For the integration tests, this is my fault for not being clear, but we should try to not use the run a sql file and then test off it
method if we can avoid it. Instead, let's use seed csvs and run dbt seed
as part of the test suite. Check out the 052_column_quoting
test as a good example of this pattern.
In the very long term, we'd like to move more tests into a common integration suite for all adapters (the dbt-adapter-tests suite), and .sql
files are not very portable since every database can have its own silly syntax.
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.
This is looking great! I have one small comment about the error message. It looks like there are a few flake8 (code style) errors as well.
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.
Nice work! I'll leave final code review to @beckjake
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.
Looks great! I have one tiny request on the changelog. Once that's done and tests pass, this is good to merge.
@@ -3,6 +3,7 @@ | |||
|
|||
### Under the hood | |||
- Added 3 more adapter methods that the new dbt-adapter-test suite can use for testing. ([#2492](https://github.com/fishtown-analytics/dbt/issues/2492), [#2721](https://github.com/fishtown-analytics/dbt/pull/2721)) | |||
- Check for Postgres relation names longer than 63 and throw exception. ([#2197](https://github.com/fishtown-analytics/dbt/issues/2197)) |
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.
You should also add a link to this PR!
resolves #2197
Description
Postgres table names (for both models and temporary tables) that are longer than 63 characters are silently truncated causing various problems in dbt processing.
Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.