Welcome to the dbt project! Follow the steps below to set up your environment, configure the project, and ensure everything is ready for development.
-
Create a virtual environment:
python3 -m venv .venv
-
Activate the virtual environment:
-
On macOS/Linux:
source .venv/bin/activate
-
On windows:
venv\Scripts\activate
-
Install the required dependencies::
pip install -r requirements.txt
- Create the
profiles.yml
file::
-
dbt requires a profiles.yml file to connect to your data warehouse. Create the file in root project directory and file in the relevant details of the warehouse
cp example.profiles.yml profiles.yml
- Test the connection:
-
Run it from the virtual environment
dbt debug
- Install
pre-commit
:
-
Ensure you are in the virtual environment and run:
pre-commit install
- Run pre-commit hooks manually (optional):
-
To check all files with pre-commit hooks:
pre-commit run --all-files
- Verify pre-commit is working:
- Make a change to a file and commit it. Pre-commit hooks should automatically run before the commit is finalized.