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
- dbtenv now operates at the adapter-version level, introduced by dbt in version 1.0.0. The interface is identical to prior versions, dbtenv will automatically detect the needed adapter version from `profiles.yml`, or the `--adapter` argument set in a dbt command passed to `dbtenv --execute`.
20
+
21
+
### Changed
22
+
- Dropped support for Homebrew.
23
+
- Previously created environments through dbtenv cannot be used, and will be recreated by dbtenv at the adapter-version level.
24
+
- dbtenv's default behaviour is not to install missing dbt adapter versions automatically. It can be disabled by setting the `DBTENV_AUTO_INSTALL` environment variable to `false`.
Copy file name to clipboardExpand all lines: README.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# dbtenv
2
2
3
-
dbtenv lets you easily install and run multiple versions of [dbt](https://docs.getdbt.com/docs/introduction) using [pip](https://pip.pypa.io/) with [Python virtual environments](https://docs.python.org/3/library/venv.html), or optionally using [Homebrew](https://brew.sh/) on Mac or Linux.
3
+
dbtenv is a version manager for dbt, automatically installing and switching to the needed adapter and version of [dbt](https://docs.getdbt.com/docs/introduction).
4
4
5
5
6
6
## Installation
@@ -13,23 +13,25 @@ dbtenv lets you easily install and run multiple versions of [dbt](https://docs.g
13
13
14
14
Run `dbtenv --help` to see some overall documentation for dbtenv, including its available sub-commands, and run `dbtenv <sub-command> --help` to see documentation for that sub-command.
15
15
16
-
### Using pip and/or Homebrew
17
-
By default dbtenv uses [pip](https://pip.pypa.io/) to install dbt versions from the [Python Package Index](https://pypi.org/project/dbt/#history) into Python virtual environments within `~/.dbt/versions`.
18
-
19
-
However, on Mac or Linux systems dbtenv will automatically detect and use any version-specific dbt installations from [Homebrew](https://brew.sh/) (e.g. `[email protected]` but not plain `dbt`), and you can have dbtenv use Homebrew to install new dbt versions by setting a `DBTENV_DEFAULT_INSTALLER=homebrew` environment variable, or specifying `--installer homebrew` when running `dbtenv install`.
16
+
dbtenv uses [pip](https://pip.pypa.io/) to install dbt versions from the [Python Package Index](https://pypi.org/project/dbt/#history) into Python virtual environments within `~/.dbt/versions`.
20
17
21
18
### Installing dbt versions
22
-
You can run `dbtenv versions` to list the versions of dbt available to install, and run `dbtenv install <version>` to install a version.
19
+
You can run `dbtenv versions` to list the versions of dbt available to install, and run `dbtenv install <version>` to install a specific version.
23
20
24
-
If you don't want to have to run `dbtenv install <version>` manually, you can set a `DBTENV_AUTO_INSTALL=true` environment variable so that as you run commands like `dbtenv version` or `dbtenv execute` any dbt version specified that isn't already installed will be installed automatically.
21
+
dbtenv will automatically install the required version of dbt for the current project by default. To disable this behaviour, set the environment variable `DBTENV_AUTO_INSTALL` to `false`.
25
22
26
-
Some tips when dbtenv is using pip:
27
-
- You can customize where the dbt version-specific Python virtual environments are created by setting `DBTENV_VENVS_DIRECTORY`and `DBTENV_VENVS_PREFIX`environment variables.
23
+
Some tips:
24
+
- You can customize where the dbt package-version-specific Python virtual environments are created by setting the `DBTENV_VENVS_DIRECTORY` environment variable.
28
25
- You can have dbtenv only install Python packages that were actually available on the date the dbt version was released by setting a `DBTENV_SIMULATE_RELEASE_DATE=true` environment variable, or specifying `--simulate-release-date` when running `dbtenv install`.
29
26
This can help if newer versions of dbt's dependencies are causing installation problems.
30
27
- By default dbtenv uses whichever Python version it was installed with to install dbt, but that can be changed by setting a `DBTENV_PYTHON` environment variable to the path of a different Python executable, or specifying `--python <path>` when running `dbtenv install`.
31
28
32
29
### Switching between dbt versions
30
+
#### Adapter type
31
+
If a dbtenv command is invoked from within a dbt project, dbtenv will try to determine the in-use adapter from the default set for the project's profile in `profiles.yml`. If the `--adapter` argument is set in the dbt command passed to `dbtenv execute`, dbtenv will use that adapter's type instead.
32
+
33
+
#### dbt version
34
+
33
35
dbtenv determines which dbt version to use by trying to read it from the following sources, in this order, using the first one it finds:
34
36
35
37
1. The `dbtenv execute` command's optional `--dbt <version>` argument.
@@ -48,7 +50,7 @@ You can:
48
50
- Run `dbtenv version --global <version>` to set the dbt version globally in the `~/.dbt/version` file.
49
51
- Run `dbtenv version --local <version>` to set the dbt version for the current directory in a `.dbt_version` file.
50
52
51
-
### Running dbt versions
53
+
### Running dbt through dbtenv
52
54
Run `dbtenv execute -- <dbt arguments>` to execute the dbt version determined dynamically based on the current environment, or run `dbtenv execute --dbt <version> -- <dbt arguments>` to execute the specified dbt version.
0 commit comments