Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installed dbt but getting error "DBT command not found error"

I would like to use dbt (Data build tool) in one of my project. I am facing hurdle while creating a project or using DBT command.

I have completed the installation process as described on DBT website given here: https://docs.getdbt.com/v0.10/docs/windows. DBT installed successfully but when I tried to use DBT command for creating project it gave me error:

'dbt' is not recognized as an internal or external command, operable program or batch file.

I am using windows 10, and I have tried it for python 3.6 as well as python 3.7 version.

any help would be highly appreciated! Thanks

like image 755
Ali Hasan Avatar asked Feb 24 '26 04:02

Ali Hasan


2 Answers

In order to execute dbt command you have to be in a folder with a DBT Project. Usually it doesn't work from anywhere.

Think that you can have multiple projects and dbt run will execute models on your current project.

like image 132
Javier Montón Avatar answered Feb 25 '26 19:02

Javier Montón


Step 1: Create and activate a fresh virtual environment

$ python3 -m venv dbt-venv
$ source dbt-venv/bin/activate

Step 2: Install dbt-core and dbt adapter(s)

pip install dbt-core

Depending on your target database or data warehouse, you'll have to install the corresponding adapter. For instance, for Google BigQuery:

pip install dbt-bigquery

And you should now be able to run any dbt command.

like image 24
Giorgos Myrianthous Avatar answered Feb 25 '26 18:02

Giorgos Myrianthous



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!