

# Creating a Snowflake connection
<a name="creating-snowflake-connection"></a>

**Note**  
 Unified connections (connection v2) standardize all connections to use `USERNAME`, `PASSWORD` keys for basic auth credentials. You can still create a v1 connection via API with secrets containing `sfUser`, `sfPassword`. 

 When adding a **Data source - Snowflake** node in Amazon Glue Studio, you can choose an existing Amazon Glue Snowflake connection or create a new connection. You must choose a `SNOWFLAKE` type connection and not a `JDBC` type connection configured to connect to Snowflake. Follow the following procedure to create a Amazon Glue Snowflake connection:

**To create a Snowflake connection**

1. In Snowflake, generate a user, *snowflakeUser* and password, *snowflakePassword*. 

1. Determine which Snowflake warehouse this user will interact with, *snowflakeWarehouse*. Either set it as the `DEFAULT_WAREHOUSE` for *snowflakeUser* in Snowflake or remember it for the next step.

1. In Amazon Secrets Manager, create a secret using your Snowflake credentials. To create a secret in Secrets Manager, follow the tutorial available in [ Create an Amazon Secrets Manager secret ](https://docs.amazonaws.cn/secretsmanager/latest/userguide/create_secret.html#create_secret_cli) in the Amazon Secrets Manager documentation. After creating the secret, keep the Secret name, *secretName* for the next step. 
   + When selecting **Key/value pairs**, create a pair for *snowflakeUser* with the key `sfUser`.
   + When selecting **Key/value pairs**, create a pair for *snowflakePassword* with the key `sfPassword`.
   + When selecting **Key/value pairs**, create a pair for *snowflakeWarehouse* with the key `sfWarehouse`. This is not needed if a default is set in Snowflake. 

1. In the Amazon Glue Data Catalog, create a connection by following the steps in [Adding an Amazon Glue connection](https://docs.amazonaws.cn//glue/latest/dg/console-connections.html). After creating the connection, keep the connection name, *connectionName*, for the next step. 
   + When selecting a **Connection type**, select Snowflake.
   + When selecting **Snowflake URL**, provide the hostname of your Snowflake instance. The URL will use a hostname in the form `account_identifier.snowflakecomputing.com`.
   + When selecting an **Amazon Secret**, provide *secretName*.