Edit

Share via


Set up your Snowflake database connection

This article outlines the steps to create a Snowflake database connection.

Supported authentication types

The Snowflake database connector supports the following authentication types for copy and Dataflow Gen2 respectively.

Authentication type Copy Dataflow Gen2
Snowflake
Microsoft Account
Key-pair

Set up your connection in Dataflow Gen2

Data Factory in Microsoft Fabric uses Power Query connectors to connect Dataflow Gen2 to a Snowflake database. The following links provide the specific Power Query connector information you need to connect to Snowflake database in Dataflow Gen2:

In some cases, the Power Query connector article might include advanced options, troubleshooting, known issues and limitations, and other information that could also prove useful.

Set up your connection in Manage connections and gateways

The following table contains a summary of the properties needed for Snowflake connection:

Name Description Required
Connection name A name for your connection. Yes
Connection type Select a type for your connection. Yes
Server The host name of the Snowflake account. Yes
Warehouse The default virtual warehouse used for the session after connecting. Yes
Authentication kind Go to Authentication. Yes
Privacy Level The privacy level that you want to apply. Allowed values are None, Organizational, Privacy, and Public. Yes
Specify a text value to use as Role name Enter a text value to use as Role name. No
Connection timeout in seconds The time to wait (in seconds) while trying to establish a connection before terminating the attempt and generating an error. No
Command timeout in seconds The time to wait (in seconds) while trying to execute a command before terminating the attempt and generating an error. No
Implementation The implementation modes for test connection. No

For specific instructions to set up your connection in Manage connections and gateways, follow these steps:

  1. From the page header in Data Integration service, select Settings > Manage connections and gateways

    Screenshot showing how to open manage gateway.

  2. Select New at the top of the ribbon to add a new data source.

    Screenshot showing the new page.

    The New connection pane shows up on the left side of the page.

    Screenshot showing the New connection pane.

  3. In the New connection pane, choose Cloud, and specify the following fields:

    Screenshot showing how to set a new connection.

    • Connection name: Specify a name for your connection.
    • Connection type: Select a type for your connection.
    • Server: Specify the host name of the Snowflake account. For example, contoso.snowflakecomputing.com.
    • Warehouse: Specify the default virtual warehouse used for the session after connecting. For example, CONTOSO_WH.
  4. Under Authentication method, select your authentication from the drop-down list and complete the related configuration. The Snowflake connector supports the following authentication types:

    Screenshot showing the authentication method for Snowflake.

  5. Optionally, set the privacy level that you want to apply. Allowed values are None, Organizational, Privacy, and Public. For more information, see privacy levels in the Power Query documentation.

  6. Advanced Options are used for test connection only. Items that use this connection must specify these options in queries.

    Screenshot showing the advanced options for Snowflake.

    • Specify a text value to use as Role name: Enter a text value to use as Role name.
    • Connection timeout in seconds: Specify the time to wait (in seconds) while trying to establish a connection before terminating the attempt and generating an error.
    • Command timeout in seconds: Specify the time to wait (in seconds) while trying to execute a command before terminating the attempt and generating an error.
    • Implementation: Specify your implementation modes for test connection.
  7. Select Create to create your connection. Your creation is successfully tested and saved if all the credentials are correct. If not correct, the creation fails with errors.

Authentication

This section lists the instructions for each authentication type supported by the Snowflake connector:

Snowflake authentication

Screenshot showing that Snowflake method for Snowflake.

  • Username: Specify the login name for the Snowflake user.
  • Password: Specify the password for the Snowflake user.

Microsoft Account authentication

Screenshot showing that Microsoft Account method for Snowflake.

Select Edit credentials, which displays the sign in interface. Enter your account and password to sign in your organizational account. After signing in, go back to the New connection page.

Key-pair authentication

Screenshot showing that Key-pair authentication method for Snowflake.

To use Key-pair authentication, you need to configure and create a Key-pair authentication user in Snowflake by referring to Key-pair Authentication & Key-pair Rotation.

  • Username: Specify the login name for the Snowflake user.

  • Private key: Upload the private key file used for Key-pair authentication. After you upload the private key file, the service automatically detects whether it is encrypted or unencrypted, and displays or hides the Passphrase accordingly.

  • Passphrase: Specify the passphrase used to decrypt the private key. This is required only if the private key file is encrypted.

    Screenshot showing the passphrase option.