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

# Connect your data source to Dex

> Connect your data source and find the credentials you need.

This page is a step-by-step connection guide covering all supported connection types: databases, file uploads, and integrations.

## Before you begin, you need

* Owner role in the workspace
* Access to the source system you want to connect

<Note>
  If your source is behind a firewall or private network, add this Dex outbound IP address to your allowlist before testing the connection: **44.216.91.118**.
</Note>

**Overview**

* Dex supports three connection categories: Databases, File uploads, and Integrations.
* Databases typically connect over TCP/SSL (host, port, user, password). Files are uploaded directly. Integrations use REST APIs or OAuth.

**How connections work**

1. Provide credentials in the connection form. Dex runs a live test to validate connectivity.
2. Dex performs a schema sync to discover tables/collections and generate AI descriptions.
3. After sync, query your data using natural language; Dex translates to SQL or API calls.

## Databases

Below are the supported databases and the exact step-by-step setup for each.

### PostgreSQL

Required fields: Host, Port (default 5432), User, Password, Database.

Step-by-step:

1. Connections → Add Connection → select `PostgreSQL`.
2. Enter Host and Port (5432 unless changed).
3. Enter User and Password.
4. Enter Database name.
5. Click `Test Connection` (Dex runs `SELECT 1`).
6. Click `Connect` to begin schema sync.

Notes: Ensure inbound access from Dex's IP or whitelist. Enable SSL if required.

### Supabase (managed Postgres)

Supabase is a hosted Postgres database. Connection parameters match PostgreSQL, and you can provide either a full connection string or individual fields.

Required fields: Host, Port (default 5432), User, Password, Database — or a connection string.

Step-by-step:

1. In Supabase, gather your connection details.
   a. Sign in to Supabase and select the project you want to connect.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/supabase-project-select.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=a78c6f45e4817b19a99afcf1cddc16c5" alt="Supabase dashboard showing project selection" width="1918" height="803" data-path="images/supabase-project-select.png" />

   b. In the project dashboard, on the top bar, click **Connect**.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/supabase-connect-topbar.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=2304020ef4eae5ceee5595e048959da0" alt="Supabase project dashboard top bar with Connect button" width="1917" height="1050" data-path="images/supabase-connect-topbar.png" />

   c. Select **Direct** → **Transaction pooler** or **Session pooler**, then copy the connection string or host parameter.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/supabase-direct-pooler-connection.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=66ef8c8cfbc497d5ecdf09331232d4be" alt="Supabase connect dialog showing Direct and transaction or session pooler options" width="1786" height="1046" data-path="images/supabase-direct-pooler-connection.png" />

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/supabase-copy-cred.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=40badc30bb6e96817a7e54f91214d4ce" alt="Copy credentials" width="1671" height="1047" data-path="images/supabase-copy-cred.png" />

   d. You need the project password. If you do not have it, contact your organization admin.
2. Connections → Add Connection → select `PostgreSQL`.
3. Either paste the full connection string in the connection form, or enter Host, Port (5432), Database, Username, and Password.
4. Click `Test Connection` (Dex runs `SELECT 1`).
5. Click `Connect` to begin schema sync.

Example connection string format (replace placeholders):

```
postgresql://postgres:password@host:5432/database
```

### MySQL

Required fields: Host, Port (default 3306), User, Password, Database.

Step-by-step:

1. Connections → Add Connection → select `MySQL`.
2. Enter Host, Port, User, Password, and Database.
3. Click `Test Connection` then `Connect`.

Notes: For MySQL 8+, ensure authentication plugin compatibility (e.g., `mysql_native_password`).

### Snowflake

Authentication: Password or Key-Pair.

Required (password): User, Password, Account, Database, Warehouse, (optional Role).

Required (key-pair): User, Account, Private Key (PEM), Private Key Passphrase (optional), Database, Warehouse, Authenticator=SNOWFLAKE\_JWT.

Step-by-step:

1. Connections → Add Connection → select `Snowflake`.
2. Choose auth method (Password or Key-Pair).
3. Enter Account, User, and credentials.
4. Enter Database and Warehouse, set Role if needed.
5. Click `Test Connection` (Dex runs `SELECT CURRENT_TIMESTAMP()`), then `Connect`.

Notes: Paste full PEM (including BEGIN/END) for key-pair auth.

### MongoDB

Required fields: Username, Password, Cluster URL (without protocol), Database, Options (optional).

Step-by-step:

1. Connections → Add Connection → select `MongoDB`.
2. Get Cluster URL from Atlas (omit `mongodb+srv://`).
3. Enter Username, Password, Database, and Options as needed.
4. Click `Test Connection` then `Connect`.

Notes: Add Dex's IP to Atlas Network Access whitelist. Dex samples documents to infer schema.

### Google BigQuery

Required fields: Project ID, Dataset ID, Service Account JSON key.

Step-by-step:

1. Create a Service Account in GCP.
   a. Go to GCP Console ([cloud.google.com](https://cloud.google.com)) and sign in to your account.
   b. Search for "IAM and Admin" in the search bar and select it.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/bigquery-iam-admin-search.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=69842f1b0a14355c244c667fbefd8a15" alt="BigQuery IAM and Admin search" width="1918" height="1048" data-path="images/bigquery-iam-admin-search.png" />

   c. On the left sidebar, click **Service Accounts**, then select **Create Service Account**.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/bigquery-service-accounts-create.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=01ff7263fb783b0e4a9391c082a70470" alt="BigQuery create service account screen" width="1928" height="988" data-path="images/bigquery-service-accounts-create.png" />

   d. Enter a name and grant the **BigQuery Data Viewer** and **BigQuery Job User** roles.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/bigquery-service-account-roles.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=9c721efe471e920021c798787f4194d9" alt="BigQuery service account role assignment" width="780" height="559" data-path="images/bigquery-service-account-roles.png" />

   e. Once created, click the service account ID, open the **Keys** tab, then select **Add key** → **Create new key** → **JSON**.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/bigquery-keys-tab.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=b304907ce3f8ef2f0ddbb84534eb19ab" alt="BigQuery service account keys tab" width="1600" height="579" data-path="images/bigquery-keys-tab.png" />

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/bigquery-add-key-menu.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=17a3b1ad0c0057f3782ce291575cfe40" alt="BigQuery add key menu" width="501" height="417" data-path="images/bigquery-add-key-menu.png" />

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/bigquery-json-key-download.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=e276fe88865e0dc4124bbba1aafc2efb" alt="BigQuery JSON key download dialog" width="874" height="466" data-path="images/bigquery-json-key-download.png" />

   f. The key downloads automatically after you create it.
2. Connections → Add Connection → select `BigQuery`.
3. Enter Project ID and Dataset ID, upload or paste Service Account JSON.
4. Click `Test Connection` then `Connect`.

Notes: Ensure the service account has the required IAM roles.

### Databricks

Required fields: Server Hostname, HTTP Path, Access Token.

Step-by-step:

1. In Databricks SQL Warehouses, open Connection details to find Server Hostname and HTTP Path.

   a. Sign in to your Databricks dashboard at [https://www.databricks.com/](https://www.databricks.com/). On the left sidebar select **SQL Warehouses**, then choose the warehouse you want to connect.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/databricks-warehouse.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=92ef710be9fb127b80499bae5ad23c86" alt="Databricks SQL Warehouses list" width="1925" height="1045" data-path="images/databricks-warehouse.png" />

   b. Open **Connection details** for the selected warehouse and copy the **Server Hostname** and **HTTP Path** shown in the dialog.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/databricks-connection-details.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=eba112ed3fe19e99bf1e7e8dddd03a5d" alt="Databricks connection details dialog showing server hostname and HTTP path" width="1672" height="962" data-path="images/databricks-connection-details.png" />

2. Generate a Personal Access Token in Databricks user settings and copy it into the Dex connection form.

   a. From the Databricks dashboard, click your user avatar in the top-right and choose **User Settings**.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/databricks-settings.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=e6a1492b16944663b6dab50b446d673b" alt="Databricks user avatar menu and Settings" width="657" height="581" data-path="images/databricks-settings.png" />

   b. On the Settings page select **Developer** → **Access tokens**, then click the **Manage** button.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/databricks-token-manage.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=467e13abf2d9b9db20a640c713898f91" alt="Databricks Access tokens manage button" width="1918" height="956" data-path="images/databricks-token-manage.png" />

   c. Click **Generate new token**, give the token a descriptive name, set the lifetime, and under **Scope** choose **Other APIs** and select the scopes: **clusters**, **workspace**, **unity-catalog**, and **sql**. Submit to create the token.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/databricks-generate-token.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=daee040dd24f80b9bf84e902a50d998e" alt="Databricks generate token form with name, lifetime, and scope options" width="1442" height="996" data-path="images/databricks-generate-token.png" />

   d. Copy the generated token and paste it into the Dex Databricks connection form when prompted.

3. Connections → Add Connection → select `Databricks` and provide Server Hostname, HTTP Path, and Access Token.

4. Click `Test Connection`, choose Catalog/Schema, then `Connect`.

Notes: Dex uses Unity Catalog naming (catalog.schema.table).

### Amazon Redshift

Required fields: Host (cluster endpoint), Port (default 5439), User, Password, Database.

Step-by-step:

1. Sign in to AWS Console and locate your Redshift cluster details.

   a. Sign in to the AWS Console at [https://signin.aws.amazon.com](https://signin.aws.amazon.com) and search for **Redshift** in the services bar.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/redshift-console.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=517bb00da57ace0b631e15c6dee677f3" alt="AWS Console with Redshift search" width="1918" height="1048" data-path="images/redshift-console.png" />

   b. From the left sidebar, select **Namespace configuration**, click the namespace you want to connect and find the **Database name** and **Username**.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/redshift-namespace.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=1e684537fb2dfe4be7ba24516149ac27" alt="Redshift namespace configuration page showing database and username" width="1902" height="1044" data-path="images/redshift-namespace.png" />

   c. From the left sidebar, select **Workgroup configuration**, then choose the workgroup attached to your namespace and copy the **Endpoint**.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/redshift-workgroup.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=876ef55b714af140022970f47f8c7baa" alt="Redshift workgroup configuration showing endpoint" width="1917" height="1045" data-path="images/redshift-workgroup.png" />

   d. If you do not have the password to access the namespace, contact the admin in charge of your AWS organization or account.

2. Connections → Add Connection → select `Redshift`.

3. Enter Host (endpoint), Port (default 5439), User, Password, and Database.

4. Click `Test Connection` then `Connect`.

Notes: Configure VPC Security Group to allow Dex's IP or make the cluster publicly accessible if needed.

## File-based connections

### CSV

Step-by-step:

1. Connections → Add Connection → select `CSV`.
2. Upload CSV (supported encodings: UTF-8, UTF-8 BOM, Latin-1).
3. Dex auto-detects headers and types, converts to Parquet for fast querying.
4. Name the connection and click `Connect`.

## Integrations (APIs)

### Stripe

Required fields: Secret API Key (`sk_test_` or `sk_live_`).

Step-by-step:

1. Connections → Add Connection → select `Stripe`.
2. Copy Secret API Key from Stripe Dashboard → Developers → API keys.

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/stripe-developers-menu.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=b2e3973c9687f0cc262f40b0b2ebdf80" alt="Stripe dashboard Developers menu" width="1280" height="534" data-path="images/stripe-developers-menu.png" />

   <img src="https://mintcdn.com/afriex-15dca5c4/M8gCy3JoCwnYQ8q5/images/stripe-copy-secret.png?fit=max&auto=format&n=M8gCy3JoCwnYQ8q5&q=85&s=32cdb9519231603f1bd524cf829e4b4a" alt="Stripe API keys list with copy secret key button" width="1280" height="605" data-path="images/stripe-copy-secret.png" />
3. Paste the key, select enabled resources, click `Test Connection`, then `Connect`.

Notes: Restricted keys (`rk_`) are not supported.

### Shopify

Required fields: Shop Domain (`yourstore.myshopify.com`), Admin API Access Token.

Step-by-step:

1. Connections → Add Connection → select `Shopify`.
2. Create an app in Shopify Admin, enable required Admin API scopes.
3. Install the app and copy the Admin API access token.
4. Enter Shop Domain and Access Token, select resources, `Test Connection`, then `Connect`.
