-
Notifications
You must be signed in to change notification settings - Fork 495
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
dbt_utils 1.0 fails to handle empty strings in slugify #773
Comments
Hey @atvaccaro, good catch! I'd welcome a fix for this - agreed that if it's an empty string, we can just return the empty string. Please also add a test for this in the slugify tests model |
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 comment on the issue or else it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
Hi all, did we find a fix for this. I am encountering this issue and would appreciate any help to fix it. Thanks. |
+1 |
@dkeyer-twilio this has been fixed in |
Describe the bug
In the 1.0 release,
dbt_utils.slugify
was changed to prepend an underscore if the string has a leading digit, but fails to handle empty strings.Steps to reproduce
Call
dbt_utils.slugify('')
.Expected results
I think an empty string should be returned, rather than the user having to check if the string is empty first.
Actual results
A compilation error is raised with
str object has no element 0
.Screenshots and log output
When compiling a model that calls slugify.
System information
The contents of your
packages.yml
file:Which database are you using dbt with?
The output of
dbt --version
:dbt --version
actually hangs for me right now 🤔Additional context
see link above
Are you interested in contributing the fix?
Sure I think it's a 1-line change.
The text was updated successfully, but these errors were encountered: