Skip to main content

Local development

Using virtual environments

Virtualenv is the most common and easy to install tool for virtual environments. It’s a great tool for beginners.

python3 -m venv dbt-env             # create the environment
source dbt-env/bin/activate # activate the environment for Mac and Linux
dbt-env\Scripts\activate # activate the environment for Windows

If you install dbt in a virtual environment, you need to reactivate that same virtual environment each time you create a shell window or session.

Install a specific package of dbt-athena in your project

Local package

When you are experiencing a bug, it's often very useful to run against a local version of dbt-athena, with the ability to add debug logs and fixes.

requirements.txt
-e /Users/username/Code/dbt-athena

Then, run pip install -r requirements.txt

Git branch

To test a specific branch in your project, add the following to your requirements.txt file:

requirements.txt
git+https://github.com/dbt-athena/dbt-athena.git@main#dbt-athena-community

Then, run pip install -r requirements.txt

Unit tests

To run the unit tests using Pytest in dbt-athena, follow these instructions:

make install_deps
make unit_test
0