-
Notifications
You must be signed in to change notification settings - Fork 59
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
[CT-1519] [Bug] Better error message for misspecified dist key yaml config #224
Comments
@dluftspring thank you for noticing and reporting this! You are spot-on with your assessment, and it definitely makes sense to proactively notice where the type of input is unexpected and indicate how to fix it. I'm going to label this as a "good_first_issue" for a contributor to pick up. Implementation suggestionRaise an error at the beginning of this macro if dbt-redshift/dbt/include/redshift/macros/adapters.sql Lines 2 to 14 in 717018a
|
If that's all that needs to be done I can contribute the fix for this |
Awesome @dluftspring ! When you open up a PR for this, just add the following as the first line:
This will help the reviewer of the PR link back to this conversation. |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
Is this a new bug in dbt-redshift?
Current Behavior
If you set the dist key in a
model.yml
file likedbt will throw the following error
list has no attribute strip
Which is generic and non descriptive of what the user should fix. The issue is that since dist keys can only be single valud properties it should be specified as
dist: primary_key
.Expected Behavior
A better message that isn't exposing the underlying python machinery and indicates what the user should do to fix the issue e.g. Single valued properties cannot be specified as a list
Steps To Reproduce
See Current Behaviour. If you set up a model like that in any dbt project you will reproduce the error
Relevant log output
No response
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: