Introduction

This a guide to authenticating to Snowflake with RED, it covers how to configure RED with the different authentication types but does not go into detail of Snowflake setup steps. For advanced Snowflake setup, including ODBC DSN registry settings, please refer to Snowflake's documentation.

This guide is based on these versions of Snowflake ODBC driver and SnowSQL, in earlier versions some options and settings may not be available or must be set using a different method, please refer to Snowflake documentation for your specific version.

Versions used in this guide:

Setup Tips

Since RED Scheduler can run on a different machine and/or under a different user it is important to make sure that the service user the RED Scheduler is running under has access to the ODBC DSN which has been configured and tested for a given authentication type. Each machine running RED or the RED Scheduler will need to be configured to suit the desired authentication type.

Examples: 


Snowflake Authentication Methods Supported by RED

The guides for each authentication type below are located here:

Authentication type

RED Advanced Connect

RED Legacy Connect

Key Pair

Fully supported

Partially supported

MFA

Fully supported

Partially supported

PAT

Fully supported

Partially supported


Other Snowflake authentication methods may also work with RED by following similar configuration methods outlined in this guide. In RED 10.6 we will add a script based authentication feature that enables extended oAuth style workflows.  

RED Legacy Connect vs Advanced Connect

The term ‘Legacy Connect’ in RED refers to the underlying ODBC Connection library used in earlier versions of RED which only accepted combinations of DSN, USER and PASSWORD. This connection method was an older ODBC standard and newer ODBC connection standards allow for full control of connection strings to support the wide variety of authentication types each ODBC driver implements.

In RED 9.0+ and RED 10.2+ the newer connection method was adopted and the feature was termed ‘Advanced Connect’. This feature allowed full control of ODBC connection strings in RED and the introduction of RED Profiles which securely store credentials outside of the RED metadata repository allowing every user of RED to have their own personal set of database credentials.

RED versions 8.6.x.x and below use Legacy Connect, as well as RED 10.0 - 10.1, therefore in order to work with emerging authentication types on these versions some workarounds are required.

In order to benefit from the RED Advanced Connect feature, you should either be on RED 9 or RED 10.2+. RED 9 versions are the only versions to offer both Legacy and Advanced Connect feature. RED 10.2 and beyond only support Advanced Connect.

RED VersionLegacy ConnectAdvanced Connect
8.6.x.x (or earlier)(tick) (minus) 
9.0.x.x(tick) (tick) 
10.0.x.x(tick) (minus) 
10.1.x.x(tick) (minus) 
10.2.x.x (or greater)(minus) (tick) 

Snowflake ODBC Connections - Legacy Connect

The following applies to RED Template Types: Python and PowerShell

SnowSQL Connections - both Legacy and Advanced Connect

Note: Snowflake have deprecated SnowSQL in favor of Snowflake CLI

When WhereScape originally wrote the templates for Snowflake the Snowflake ODBC driver had limited functionality so some of the operations required for loading, such as uploading files to Snowflake, were only available via SnowSQL. Later when WhereScape developed the Python based templates the newer Snowflake ODBC driver was able to perform all operations we required so the Python templates used ODBC exclusively. It is possible via a small code change in the WhereScape PowerShell common module to convert calls to snowsql into ODBC allowing existing PowerShell RED host scripts to connect to Snowflake with ODBC exclusively.

The following applies to RED Template Type: PowerShell only: