> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mage.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add an existing dbt project to Mage

> If you have an existing dbt project, you can add it to your Mage project.

For example, if your Mage project is named `demo_project` and your existing dbt
project is named `demo`, add your dbt project in the Mage project under the
following path:

```
demo_project/dbt/demo/
```

You can have multiple dbt projects in a single Mage project under the folder
named `dbt/` at the root location of your Mage project.

For example:

```
demo_project/
|   dbt/
|   |   demo/
|   |   |   ...
|   |   project_2/
|   |   |   ...
```

***

## Required structure

### Connection profiles

For Mage to properly run dbt commands, you must have a `profiles.yml` file at
the root of each of your dbt projects. For example:

```
demo_project/
|   dbt/
|   |   demo/
|   |   |   profiles.yml
|   |   project_2/
|   |   |   profiles.yml
```

For more information on how to configure dbt connection profiles, read this
[documentation](/dbt/connection-profiles).
