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

# Data connection

Data connection in nao is key.\

It allows you to browse, view, query your data directly in the IDE.\

It gives context of your data schema to nao AI featurse.

> [!TIP]
>
> **Data privacy:**\
> When you connect a data warehouse to nao, your connection stays between your computer and the data warehouse. **No data content is ever sent to nao servers or the LLM.** Only metadata (like table and column names) is used to provide warehouse context to nao features.
>
> Read more about how your data is secured in our [security documentation](https://docs.getnao.io/nao-ide/support/security.md).

## Add a data connection

To add a connection:\

Go to Settings > Warehouse Connections > Add Connection\


![Data connection panel](https://mintcdn.com/naolabs/hnfoHyTp46IcsGKd/images/get-started/dataco_data_connection_panel.png?fit=max\&auto=format\&n=hnfoHyTp46IcsGKd\&q=85\&s=52d6a62cba3becf1edc3a45257ef00c8)

> [tab] BigQuery
>
> **connection\_name** `string` *required*
>
> Display name for this connection inside nao.
>
> **project\_ids** `string` *required*
>
> Comma-separated project IDs. Supports wildcards (e.g. `project_*`) and exclusions (`!project-dev`).
>
> **region** `string`
>
> Optional BigQuery location. Leave blank to use the project default.
>
> **datasets** `string`
>
> Optionally scope access to specific datasets by listing them explicitly.
>
> **authentication\_method** `string` *required* (default: SSO via OAuth)
>
> Choose between **SSO via OAuth** or **Service Account**. SSO requires your BQ project ID; service accounts use key files.
>
> **service\_account\_private\_key** `file`
>
> Required only when **Service Account** authentication is selected. Upload the JSON key for a service account with at least the **BigQuery Data Viewer** (Reader) role.
>
> > [!TIP]
> >
> > **Connect multiple BigQuery projects**
> >
> > Select multiple project-ids and datasets using the following patterns:
> >
> > * Comma separated values (project1,project2): Select specific projects by listing them explicitly (no space after the comma)
> > * Wildcard prefix (project\_\*): Select all projects that start with "project\_"
> > * Exclusion (!project2): Select all projects except "project2"
>
> > [!NOTE]
> >
> > **Set query size limits**
> >
> > You can limit the size of queries executed within nao.
> >
> > If you do, nao will perform a dry run of every query, and cancel query execution if it's above the GB limit.
> > The limit will be effective for **both user queries and AI agent queries**.
> >
> > Go to Settings → Warehouse Connections and set the query size limit field to the maximum rows you want nao to run automatically.

> [tab] Snowflake
>
> **connection\_name** `string` *required*
>
> Name that appears inside nao; can be any label you prefer.
>
> **account\_id** `string` *required*
>
> Snowflake account identifier without `.snowflakecomputing.com`.
>
> **warehouse** `string` *required*
>
> Target warehouse for query execution.
>
> **role** `string`
>
> Optional role override for this connection.
>
> **databases** `string`
>
> Optional list of databases to load. Supports comma-separated values, wildcards (`db_*`), and exclusions (`!db2`).
>
> **schemas** `string`
>
> Optional schemas to load. Accepts the same comma, wildcard, and exclusion patterns as databases.
>
> **authentication\_method** `string` *required* (default: SSO)
>
> Choose between **Password**, **SSO**, or **Key Pair Authentication**.
>
> **password\_auth.username** `string`
>
> Only required when **Password** authentication is selected.
>
> **password\_auth.password** `string`
>
> Password for the Snowflake user. Approve the DUO prompt both when testing and saving the connection.
>
> **key\_pair\_auth.username** `string`
>
> Snowflake user that owns the private key. Required for **Key Pair Authentication**.
>
> **key\_pair\_auth.private\_key** `file`
>
> Upload the PEM private key file corresponding to your Snowflake user.
>
> **key\_pair\_auth.passphrase** `string`
>
> Optional passphrase protecting the private key.
>
> > [!TIP]
> >
> > **MFA reminder**
> > Password-based logins require approving the DUO push twice: once for **Test Connection** and again for **Save**.

> [tab] Postgres
>
> **connection\_name** `string` *required*
>
> Friendly name for the connection inside nao.
>
> **host** `string` *required*
>
> Hostname or IP where Postgres is reachable.
>
> **port** `number` *required* (default: 5432)
>
> Listening port for your Postgres instance.
>
> **database** `string` *required*
>
> Target database to connect to.
>
> **username** `string` *required*
>
> Database user nao should authenticate with.
>
> **password** `string` *required*
>
> Password for the database user. Stored securely in nao.
>
> **advanced\_options.ssh** `boolean` (default: false)
>
> Enable SSH tunneling. When toggled, provide the SSH host, port, username, and a private key or password.
>
> **advanced\_options.ssl\_tls** `boolean` (default: false)
>
> Turn on SSL/TLS. Choose SSL, TLS, or add channel binding depending on your Postgres setup.

> [tab] Databricks
>
> **connection\_name** `string` *required*
>
> Name that appears inside nao for this workspace connection.
>
> **server\_hostname** `string` *required*
>
> Databricks workspace hostname.
>
> **http\_path** `string` *required*
>
> HTTP path for the SQL warehouse or cluster you want nao to use.
>
> **default\_catalog** `string`
>
> Optional catalog that nao should select by default.
>
> **default\_schema** `string`
>
> Optional schema to use when one is not specified in queries.
>
> **authentication\_method** `string` *required* (default: OAuth User-to-Machine (U2M))
>
> Choose between **OAuth User-to-Machine (U2M)** or **Personal Access Token**.
>
> **personal\_access\_token** `string`
>
> Required only when using the **Personal Access Token** authentication method.

> [tab] Redshift
>
> **connection\_name** `string` *required*
>
> Friendly label for this Redshift connection.
>
> **host** `string` *required*
>
> Redshift cluster endpoint.
>
> **port** `number` *required* (default: 5439)
>
> Port Redshift listens on (defaults to 5439).
>
> **database** `string` *required*
>
> Default database nao should use.
>
> **username** `string` *required*
>
> Database user with access to the schemas you need.
>
> **password** `string` *required*
>
> Password for that database user.
>
> **advanced\_options.ssh** `boolean` (default: false)
>
> Enable SSH tunneling and provide SSH host, port, username, and private key/passphrase.
>
> **advanced\_options.ssl\_tls** `boolean` (default: false)
>
> Turn on SSL/TLS. Choose SSL, TLS, and optional channel binding per your security requirements.

> [tab] ClickHouse
>
> **connection\_name** `string` *required*
>
> Friendly label for this ClickHouse connection.
>
> **authentication\_method** `string` *required* (default: HTTPS)
>
> Choose between **HTTPS** or **Local**.
>
> **url** `string` *required*
>
> Full URL to your ClickHouse instance, including protocol and port. Use `http://localhost:8123` for Local connections or `https://your-instance.clickhouse.cloud:8443` for HTTPS connections.
>
> **username** `string` *required*
>
> ClickHouse user with access to the databases you need.
>
> **password** `string` *required*
>
> Password for the ClickHouse user.
>
> **database** `string`
>
> Optional database to load. If not specified, nao will discover available databases.

> [tab] Amazon Athena
>
> **connection\_name** `string` *required*
>
> Friendly name for the Athena connection inside nao.
>
> **region** `string` *required*
>
> AWS region where your Athena workgroup runs.
>
> **access\_key\_id** `string` *required*
>
> Access key for the IAM user or role you created for nao.
>
> **secret\_access\_key** `string` *required*
>
> Secret key paired with the access key.
>
> **database** `string`
>
> Optional default Athena database to load.

> [tab] DuckDB
>
> **connection\_name** `string` *required*
>
> Choose any label for the DuckDB connection inside nao.
>
> **database\_type** `string` *required* (default: File Database)
>
> Select **File Database** to point to a `.duckdb` file, or **In-Memory Database** to create a temporary in-memory database.
>
> **database\_file\_path** `string`
>
> Required when **File Database** is selected. Browse to an existing file or provide a new path to create one.
>
> **schema\_filter** `string`
>
> Optional comma-separated list of schemas to load.
>
> **read\_only\_mode** `boolean` (default: false)
>
> Enable to prevent nao from making any modifications to the DuckDB database.

> [tab] MotherDuck
>
> MotherDuck connections use the same flow as DuckDB. Open the **DuckDB** tab in this section and follow that form to connect to your MotherDuck warehouse.

To check your data is connected, open the left panel then click on the data warehouse icon. Here you will see all the tables from your data connection.

When you click on a table, you will be able to preview it directly within nao.

![Data preview](https://mintcdn.com/naolabs/hnfoHyTp46IcsGKd/images/get-started/dataco_data_preview.png?fit=max\&auto=format\&n=hnfoHyTp46IcsGKd\&q=85\&s=d81419ca2ff95ab2b9b56fea15147097)

## Multiple data connections

You can connect multiple databases at once in nao.\

You can choose to:

* Set a connection as a global connection (available across all folders in nao)
* Attach a connection to a specific workspace

To do this, hover over a connection and you'll see the options:
"Attach to workspace" or "Make global"

> [!NOTE]
>
> **Only one connection is active at once in nao.**
>
> You can choose the active connection either from the data tree on the left or from the nao settings / data connections menu with the small circles.

![Data Multiple connections](https://mintcdn.com/naolabs/hnfoHyTp46IcsGKd/images/get-started/dataco_multiple_connections.png?fit=max\&auto=format\&n=hnfoHyTp46IcsGKd\&q=85\&s=6f1f793a041f101f20c64d40556e163e)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.