You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When inspecting the manifest, its latest_version values all looked correct. So the underlying difference is probably in the implementation of ref() somehow.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
[Bug] Version 0 makes itself the latest_version
[CT-2436] [Bug] Version 0 makes itself the latest_versionApr 18, 2023
Is this a new bug in dbt-core?
Current Behavior
https://docs.getdbt.com/docs/collaborate/govern/model-versions#how-to-create-a-new-version-of-a-model
I was expecting that I could do something like this:
And then have a model that generically always selects from the
latest_version
(without actually needing to specify the version):models/dim_customers_latest
But the
ref
erence doesn't work correctly when starting the versioning at 0. It does work when starting the versioning at 1.Expected Behavior
See above.
Steps To Reproduce
Not working when starting with
v: 0
models/_models.yml
models/dim_customers.sql
models/dim_customers_v1.sql
models/dim_customers_latest.sql
Run the models and inspect the latest version:
This also doesn't work
Explicitly setting the
latest_version
doesn't work either:Working when starting with
v: 1
Same project as above, but with the following modifications:
Re-index the version numbers:
models/_models.yml
Rename v1 to v2:
Try it again, and it shows the expected data:
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
No response
Additional Context
When inspecting the manifest, its
latest_version
values all looked correct. So the underlying difference is probably in the implementation ofref()
somehow.The text was updated successfully, but these errors were encountered: