> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/fabricate/databases-and-data/data-agent-db-create-manage/database-add-connection.md).

# Adding a database connection to a project

{% hint style="info" %}
Database connections require an Enterprise license.

Your external database must allow connections from the [Fabricate IP addresses](/fabricate/about-fabricate/fabricate-ip-addresses.md).
{% endhint %}

A Live Connect database connection is a live connection to an external database. After you establish the connection, to add data to the database, you [prompt the Data Agent](/fabricate/databases-and-data/adding-data-to-a-database/data-generate-data-connection.md).

## **Supported database platforms**

Database connections can connect to the following databases:

* Amazon Redshift
* Google BigQuery
* Microsoft Fabric
* MySQL
* Oracle
* PostgreSQL
* Snowflake
* SQL Server

## **Defining a database connection**

To add a database connection to a project:

1. In the navigation panel, click the project options menu.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FU3W4Gu7AdJPrNyB7SzNi%2FProject_OptionsMenu.png?alt=media&amp;token=c84c00f0-3c4b-4837-8347-9777b3ca4d0c" alt=""><figcaption><p>Option to connect to an external database</p></figcaption></figure>

2. Under **Databases**, click **Connect external database**.

### Selecting or creating the server connection

From the **Server** dropdown list, select the server connection option. You can add a new server connection, or select an existing workspace server connection.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FiFiewAgvzOFCbZtJPCwD%2FProject_DatabaseConnectionServerDropdown.png?alt=media&amp;token=60be521f-1600-4c22-ae0d-4087cacaa821" alt=""><figcaption><p>Server dropdown to select whether to create a new server connection</p></figcaption></figure>

The default option is **Enter connection details**. With this option, you provide the server connection information directly on the database connection panel. When you use this option to configure the server connection, the server connection is only used for the database connection. It is not added to the workspace list of server connections.

To create a new server connection that is added to the workspace list, select **Add a new workspace server**. Fabricate displays the **New Server Connection** panel to define the new workspace server connection.

For information about configuring a new server connection, go to [Adding, editing, and deleting server connections](/fabricate/workspaces/workspace-server-connections/server-connection-add-edit-delete.md#adding-a-server-connection).

To use an existing workspace server connection, select it from the list.

### Identifying the database

After you select the server connection, you identify the specific database to connect to on the server connection.

#### Platforms other than Google BigQuery or Microsoft Fabric

For platforms other than Google BigQuery or Microsoft Fabric, in the **Database** field, provide the name of the database.

#### Google BigQuery

For Google BigQuery, in the **Dataset** field, provide the name of the dataset to connect to.

#### Microsoft Fabric

For Microsoft Fabric:

1. From the **Lakehouse** dropdown list, select the lakehouse that contains the data.
2. Optionally, in the **Schema** field, provide the schema to use.

   \
   If the lakehouse contains a schema, then Fabricate automatically detects it and populates the field.

   \
   If the lakehouse data does not contain a schema, then leave the field empty.

### Providing a name to use to refer to the database connection

In the **Name in Fabricate** field, provide a name to use to refer to the database in the Data Agent chat.

### Testing and saving the connection

1. To test the connection to the database, click **Test Connection**.
2. To save the database connection, click **Connect database**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tonic.ai/fabricate/databases-and-data/data-agent-db-create-manage/database-add-connection.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
