This example requires Poetry. You can use pipx with pipx install poetry to install it. For further instructions, see docs.
To get started with a sample project using dbt and MotherDuck, first create and activate a new Python environment using Poetry.
poetry install
source .venv/bin/activate
To set up your MotherDuck profile, you can copy over the profiles.yml file from this sample into your ~/.dbt folder.
Please make sure to replace dbt_example with the name of the project you created in the previous step.
If you want to keep the profiles.yml file in a different location, you can run:
export DBT_PROFILES_DIR=/path/to/folder
Where /path/to/folder is the location of the profiles.yml file in this example.
Edit the dbt.env file and add your MotherDuck token. You can then load it into your environment by running:
set -a; source dbt.env; set +a
Then, create a new dbt project:
dbt init
To run the example dbt project, run:
dbt run
in your new project folder.