> 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/app/setting-up-your-database/snowflake/connecting-to-snowflake/snowflake-source-connection.md).

# Connecting to the Snowflake source database

In the **Source Settings** section, provide the details for the connection to the source database.

## Selecting whether to use a connection string

By default, you provide the connection information in the individual connection fields.

To instead use a connection string, toggle **Use connection string** to the on position.

## Selecting the authentication method to use

{% hint style="info" %}
Snowflake is phasing out the ability to use a simple password. We recommend that you use key pair authentication.
{% endhint %}

By default, the connection uses key pair authentication, and the **Use Key Pair Authentication** toggle is in the on position.

To instead use a password, toggle **Use Key Pair Authentication** to the off position.

## **Providing the source connection information** <a href="#snowflake-aws-connection-source-fields" id="snowflake-aws-connection-source-fields"></a>

### **Populating the source connection fields** <a href="#snowflake-aws-connection-source-fields" id="snowflake-aws-connection-source-fields"></a>

If **Use server credentials** is selected:

1. In the **Server** field, provide the server where the database is located.\
   \
   You must provide the full path to the server. `https://` is optional.\
   \
   So the format of the server value can be either:

   * `<account>.<region>.snowflakecomputing.com`
   * `https://<account>.<region>.snowflakecomputing.com`

   For example: `abc123456.us-east-1.snowflakecomputing.com` or `https://abc123456.us-east-1.snowflakecomputing.com`
2. In the **Database** field, provide the name of the database.
3. In the **Username** field, provide the username for the account to use to connect to the database. If secrets managers are available, you can [select a secret name from a secrets manager](/app/workspace/workspace-configuration-settings/secrets-manager/selecting-a-secrets-manager-secret.md).

### **Providing a source connection string** <a href="#snowflake-aws-connection-source-string" id="snowflake-aws-connection-source-string"></a>

If **Use connection string** is selected, then in the **Connection String** field, provide the connection string.

The connection string uses the following format:

{% code overflow="wrap" %}

```
account=<account>;host=<account>.<region>.snowflakecomputing.com;user=<username>;db=<database>
```

{% endcode %}

## Providing source authentication details <a href="#snowflake-aws-source-key-pair-auth" id="snowflake-aws-source-key-pair-auth"></a>

### Key pair authentication <a href="#snowflake-aws-source-key-pair-auth" id="snowflake-aws-source-key-pair-auth"></a>

If key pair authentication is enabled (**Use Key Pair Authentication** is in the on position):

1. For **RSA Private Key**, click **Browse**, then select the key file.
2. If the key is encrypted, then in the **Encrypted Key Passphrase** field, provide the passphrase to use to decrypt the key.

### Password authentication

If key pair authentication is disabled (**Use Key Pair Authentication** is in the off position), then in the  **Password** field, either:

* Specify the password manually.
* If secrets managers are available, [select a secret name from a secrets manager](/app/workspace/workspace-configuration-settings/secrets-manager/selecting-a-secrets-manager-secret.md).

## Testing the source connection <a href="#snowflake-aws-source-connection-test" id="snowflake-aws-source-connection-test"></a>

To test the connection to the source database, click **Test Source Connection**.

## Indicating whether to trust the server certificate <a href="#snowflake-aws-source-trust-server-certificate" id="snowflake-aws-source-trust-server-certificate"></a>

To trust the server certificate, and ignore the certificate authority's revocation list, toggle **Trust Server Certificate** to the on position.

This option can be useful when your Tonic Structural instance cannot connect to the certificate authority.

## Using an alternative connection method <a href="#alternative-connection-method" id="alternative-connection-method"></a>

To make the connection, you can optionally use either:

* A proxy connection
* Tailscale tunneling

To enable an alternative connection method, toggle **Enable Connection Method** to the on position.

### Using a proxy connection <a href="#snowflake-source-connection-proxy" id="snowflake-source-connection-proxy"></a>

{% hint style="info" %}
When you use a connection string to connect to the source database, Structural automatically adds the configured proxy connection parameters to the connection string.

If you manually include proxy connection parameters in the connection string, and also configure the proxy connection settings, the connection string will have duplicate proxy connection parameters.

We recommend that you use the configuration fields to enable the proxy connection, and do not include proxy connection parameters in the connection string.
{% endhint %}

To use a proxy server to connect to the source database:

1. From the **Connection Method** dropdown list, select **Proxy**.
2. In the **Proxy Host** field, provide the host name for the proxy connection.
3. In the **Proxy Port** field, provide the port for the proxy connection.
4. Optionally, in the **Proxy User** field, provide the name of the user for the proxy connection.
5. If you provide a proxy user, then in the **Proxy Password** field, provide the password for the specified user.
6. Optionally, in the **Non-Proxy Hosts** field, provide the list of hosts for which to bypass the proxy server and connect to directly.

Use a pipe symbol (`|`) to separate the host names. For example, `host1|host2|host3`.

You can also use an asterisk (`*`) as a wildcard. For example, to connect directly to all hosts with host names that start with myhost, use `myhost*`.

### Using Tailscale tunneling <a href="#snowflake-source-connection-tailscale" id="snowflake-source-connection-tailscale"></a>

{% hint style="info" %}
Snowflake requires a Tailscale **App Connector** that advertises `*.privatelink.snowflakecomputing.com`.\
Because Snowflake is a public endpoint and not a private IP address, a subnet router does not work.
{% endhint %}

To use a Tailscale tunnel to connect to the source database:

1. From the **Connection Method** dropdown list, select **Tailscale Tunnel**.
2. In the **Tags** field, provide a comma-separated list of ACL tags to use to join the tailnet. For example, `tag:tonic-worker`.
3. Optionally, in the **Control Server URL** field, provide the URL. This is intended for customers who use Headscale or a self-hosted Tailscale control plane.
4. In the **Tailscale Auth Key** field, provide a Tailscale OAuth client credential. Structural does not support other types of Tailscale keys, such as user auth keys.\
   \
   You create the credential from the [OAuth clients](https://tailscale.com/docs/features/oauth-clients) page in your Tailscale admin console.\
   \
   If secrets managers are available, you can instead [select a secret name from a secrets manager](/app/workspace/workspace-configuration-settings/secrets-manager/selecting-a-secrets-manager-secret.md).

## Limiting the included schemas <a href="#snowflake-aws-config-limit-schemas" id="snowflake-aws-config-limit-schemas"></a>

By default, the source database includes all of the schemas. To specify a list of specific schemas to either include or exclude:

1. Toggle **Limit Schemas** to the on position.
2. From the filter option dropdown list, select whether to include or exclude the listed schemas.
3. In the field, provide the list of schemas to either include or exclude. Use commas or semicolons to separate the schemas.

Do not exclude schemas that are referred to by included schemas, unless you create those schemas manually outside of Structural.


---

# 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/app/setting-up-your-database/snowflake/connecting-to-snowflake/snowflake-source-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.
