Hey there -
require-dbt-version is new in 0.13.0! If you’ve included this config in your project, make sure you’ve updated to version 0.13.0 wherever you’re running dbt.
If this config is coming from a dependency like dbt-utils, I’d recommend pinning your package to a specific revision.
What does that mean?
Glad you asked! The
dbt deps command will pull in the latest code of a package, given the
revision that you’ve specified in your
packages.yml file. If you’ve specified
master as your
revision in your
packages.yml file, then dbt will pull the latest version of
master from the specified package when you run
dbt deps. This probably isn’t desirable, as it means that the code that runs in your project can change out from under you.
Instead, you should always pin your packages to a specific revision. In practice, that looks like:
packages: - git: "https://github.com/fishtown-analytics/dbt-utils.git" revision: 0.1.22
Why did this happen?
As we build new functionality into dbt, we’ll want to leverage it in open source packages like dbt-utils. The
require-dbt-version config is going to be super helpful here, as it’s possible that the behavior of dbt will change between versions. The
require-dbt-version config will help ensure that the packages that dbt is running are compatible with the installed version of dbt.
Unfortunately, versions of dbt < 0.13.0 don’t expect to see this config, and raise an exception accordingly. As they say: the best time to require a specific dbt version was 10 releases ago; the second best time is now. Check out the docs on