Skip to content
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

[Core] Spaces in dbt model names for v1.8 upgrade guide #5352

Open
dbeatty10 opened this issue Apr 24, 2024 · 0 comments
Open

[Core] Spaces in dbt model names for v1.8 upgrade guide #5352

dbeatty10 opened this issue Apr 24, 2024 · 0 comments
Labels
content Improvements or additions to content dbt Core The changes proposed in this issue relate to dbt Core size: medium This change will take up to a week to address

Comments

@dbeatty10
Copy link
Contributor

Link to the page(s) on docs.getdbt.com requiring updates

Upgrade guide for v1.8:
https://docs.getdbt.com/docs/dbt-versions/core-upgrade/upgrading-to-v1.8

Tell us more about this update

Neither of these bullet points tell the whole story, so I'd suggest amending or removing the following:

Spaces in dbt model names

We will begin deprecating support for spaces in dbt model names in v1.8 (raising a warning) before removing support entirely in v1.9 (raising an error). Reasons for removing spaces in model names include:

  • Spaces in a model name make it impossible to --select the model name because the argument gets split into pieces over spaces very early in the pipeline.
  • Most warehouses do not accept a table, or other object, with a space in its name.

Here's some more nuanced explanation:

1. Use a * wildcard to select a model name with a space

$ dbt list -s "my*model"
20:13:53  Running with dbt=1.7.10
20:13:53  Registered adapter: postgres=1.7.10
20:13:53  Found 1 model, 0 sources, 0 exposures, 0 metrics, 401 macros, 0 groups, 0 semantic models
my_project.my model

2. Many data platforms allow table names to contain spaces

The SQL standard describes quoted identifiers, and most popular databases support them (including allowing spaces). In fact, we have identifier quoting on by default for most adapters (dbt-snowflake being the notable exception).

Reviewers/Stakeholders/SMEs

.

Related GitHub issues

See #5347 and all associated issues.

Additional information

No response

@dbeatty10 dbeatty10 added content Improvements or additions to content dbt Core The changes proposed in this issue relate to dbt Core labels Apr 24, 2024
@nataliefiann nataliefiann added the size: medium This change will take up to a week to address label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content dbt Core The changes proposed in this issue relate to dbt Core size: medium This change will take up to a week to address
Projects
None yet
Development

No branches or pull requests

2 participants