-
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
Support dots in model names #3246
Comments
Made a PR to solve it #3247 |
Also fix for the docs site: dbt-labs/dbt-docs#185 |
@monti-python Wow! You've really done your homework. Thanks for opening all these issues and associated PRs, and sorry for the delay in review on my end. Honestly, I'm pleasantly surprised that models-with-dots-in-them work as well as they do today. It's not a pattern I see often, even though (as you mention) it's something that comes up occasionally on discourse and in broader namespace conversations such as #1269. I guess the operative questions are:
As I understand it, in order for this to work on Snowflake, you'd need to either:
|
@jtcohen6 thank you for your feedback! I've updated the PR to include some integration tests as well. IMO this feature only makes sense when combined with custom parsing of At the beginning we were using double underscores as separators, but we came across some relations containing double underscores in their name. Worse yet, there might also be schemas containing double underscores, making it unusable as a separator... Of course there is always the option of a more complex separator (triple underscores for instance), but the dot character felt like the more natural way to tackle the namespacing problem, and it worked! |
Describe the bug
In our dbt project we are managing multiple schemas. We are namespacing the models with the standard SQL syntax
<schema>.<relation>.sql
and following this approach. It works quite well for the most part, however when specifying model selectors by FQN (dbt run --model myschema.mytable
) the matcher is unable to locate the desired modelsSteps To Reproduce
Using a model or seed with dots in their name and trying to run it via FQN selector (
dbt run --model model.with.dots
) will trigger the issue.Expected behavior
model.with.dots
runs successfullyScreenshots and log output
Log output is:
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
The output of
python --version
:Python 3.6.13 :: Anaconda, Inc.
Additional context
Related to #1269
The text was updated successfully, but these errors were encountered: