---
title: Snowflake key pair authentication
description: Connect to Snowflake using key pair authentication.
section_name: Data
maturity: public-preview
---

# Snowflake key pair authentication {: #snowflake-key-pair-authentication }

!!! info "Availability information"
    Key pair authentication for Snowflake is off by default. Contact your DataRobot representative or administrator for information on enabling the feature.

    <b>Feature flag:</b> Enable Snowflake Key-pair Authentication

Now available for public preview, you can create a Snowflake data connection using the key pair authentication method&mdash;a Snowflake username and private key&mdash;as an alternative to [basic authentication](dc-snowflake).

## Prerequisites {: #prerequisites }

The following is required before connecting to Snowflake in DataRobot:

* A Snowflake account
* A private key file (for instructions on generating a private key, see the [Snowflake documentation](https://docs.snowflake.com/en/user-guide/key-pair-auth){ target=_blank })

## Set up the connection in DataRobot {: #set-up-a-connection-in-datarobot }

The tabs below show how to configure a Snowflake data connection using key pair authentication:

=== "DataRobot Classic"

    When creating a Snowflake [data connection](data-conn#create-a-new-connection) in DataRobot Classic, select **Key-pair** as your credential type. Then, fill in the [required parameters](#required-parameters).
    
    ![](images/snow-keypair-2.png)

=== "Workbench"

    When creating a Snowflake [data connection](wb-connect) in Workbench, select **Key-pair** as your credential type. Then, fill in the [required parameters](#required-parameters).
    
    ![](images/snow-keypair-1.png)


## Required parameters {: #required-parameters }

In addition to the required fields listed below, you can learn about other available configuration options in the [Snowflake documentation](https://docs.snowflake.com/en/user-guide/jdbc-parameters.html){ target=_blank }.

Required field | Description 
--------------- | ---------- 
Username       | A unique identifier of a user inside a Snowflake account (i.e., the name you use to log into Snowflake).  
Private key       | The string copied from your private key file.  
Display name       | A unique identifier for your Snowflake credentials within DataRobot.  

For more information on Snowflake key pair authentication, including generating private keys and configuring key pair authentication in Snowflake, see the [Snowflake documentation](https://docs.snowflake.com/en/user-guide/key-pair-auth){ target=_blank }.

{% include 'includes/data-conn-trouble.md' %}
DataRobot returns the following error message when attempting to authenticate Snowflake credentials: <br><br>_Incorrect username or password was specified._ | Confirm that your parameters are valid; if they are, use the recommended driver version.  | Check the username, private key, and passphrase; if all parameters are valid, use the recommended driver version from the dropdown under **Show additional parameters > Driver**.<br><br>If you are using driver version 3.13.9:<br><ol><li>Click **Show additional parameters**.</li><li>Click **Add parameter** and select **account**.</li><li>Enter your account name in the field.</li></ol><br>For more information, see the [Snowflake community article](https://community.snowflake.com/s/article/JDBC-Driver-Spark-Connector-Getting-SnowflakeSQLException-Incorrect-username-or-password-was-specified-when-setting-correct-credentials){ target=_blank }.