> 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-destination-connection.md).

# Connecting to the Snowflake destination database

In the **Destination Settings** section, you specify the connection information for the destination database.

If the destination database is in the same location as the source database, then you can copy the connection details from the source database. The copied details include the proxy connection configuration.

If the destination database is in a different location, then you provide the connection details.

## Copying the source database connection details <a href="#snowflake-data-connection-destination-copy-source" id="snowflake-data-connection-destination-copy-source"></a>

To copy the connection details from the source database:

1. Click **Copy Settings from Source**.
2. Provide the authentication information for the connection.
3. To test the connection to the destination database, click **Test Destination Connection**.

## Selecting whether to use a connection string

If you do not copy the details from the source database, then 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 workspace is configured to use key pair authentication, and **Use Key Pair Authentication** is the on position.

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

## Providing destination database connection information <a href="#snowflake-data-connection-destination-connection-details" id="snowflake-data-connection-destination-connection-details"></a>

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

If **Use connection string** is off:

1. In the **Server** field, provide the server where the database is located.\
   \
   You must provide the full path to the server. The `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).
4. For **Password**, you can either specify the password manually or, 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).

### **Using a destination connection string** <a href="#snowflake-aws-destination-connection-string" id="snowflake-aws-destination-connection-string"></a>

If **Use connection string** is on, 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 the destination authentication details

### Key pair authentication <a href="#snowflake-aws-destination-key-pair-auth" id="snowflake-aws-destination-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 destination database connection** <a href="#snowflake-aws-destination-connection-test" id="snowflake-aws-destination-connection-test"></a>

To test the connection to the destination database, click **Test Destination Connection**.

## Indicating whether to trust the server certificate <a href="#snowflake-aws-destination-trust-server-certificate" id="snowflake-aws-destination-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 Structural instance cannot connect to the certificate authority.

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

To make the connection, you can optionally use either:

* A proxy connection
* Tailscale

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

### **Using a proxy connection** <a href="#snowflake-aws-destination-connection-proxy" id="snowflake-aws-destination-connection-proxy"></a>

{% hint style="info" %}
When you use a connection string to connect to the destination database, Structural adds the 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 enable and configure the proxy connection:

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 whose host names start with myhost, use `myhost*`.

### Using Tailscale tunneling <a href="#dest-connection-tailscale" id="dest-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).


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tonic.ai/app/setting-up-your-database/snowflake/connecting-to-snowflake/snowflake-destination-connection.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
