Client Configuration


IT strongly encourages Snowflake users to use the web UI provided by Snowflake.  The sign-in experience is much simpler and queries are saved in your workspace automatically.


Visual Studio Code (VS Code)


VS Code is a free tool available from Microsoft with a very large selection of useful extensions that add to the the functionality of this tool.


Installation


Download and install the latest version from the VS Code home page.  The installation is very simple and the defaults are fine.  


Extensions


Next install the "SQLTools" and "Snowflake Driver for SQLTools" extensions


Click on the "Extensions" icon in the left ribbon.  Search for SQLTools and click the "install" button in the main pain. 



Repeat the process for the "Snowflake Driver for SQLTools" extension



The SQLTools icon should be available in the left icon ribbon now.




Configuration


Add a connection configuration to the SQLTools extension



The drivers for different database tools that you have installed will be shown for select.  Pick the "Snowflake" driver. This tool will also work for MySQL, PostgreSQL, AWS Redshift, SQLite, and many other database tools. 



Fill in the form to configuration the connection:


Connection Name*             - User's discretion

Connection Group              - User's discretion

Account*                              - ma45781.west-us-2.azure (Get this value from IT.  This example is the production Connor Group data warehouse account)

Authenticator*                     - Browser Based SSO                                                             (This uses the sign sign-on integration)

User*                                    - User's email address

Database*                            -  Database to connect to                                                        (Get this value from IT if you don't know it.)

Warehouse*                         -  Warehouse to use for compute resources                           (Get this value from IT if you don't know it.)

Connection Options:

Schema                               -  Schema in the database to connect to                                 (Get this value from IT if you don't know it.)

Role                                     -  A role you've been granted with access to the schema       (Get this value from IT if you don't know it.)  


* - indicates a required field


If you don't enter a schema and role, your user's default schema and role will be used for the connection.  That can manually be changed by making a request with IT.  However, be default the value is probably the public schema and role.  Neither will allow for much functionality.  



A browser window will pop open to authenticate you to Snowflake when you test or use a connection for the first time.  This pops up the first time a connection is used at different object levels, but shouldn't repeat the action once authenticated to that object.  Sometimes the browser window will show an error, but most times the connection worked fine.  The browser window can be closed after a successful connection or an error. 


Depending on the role and permissions from the connection, you'll see a database browser tree you can navigate.  You'll also have a query editor pane and a results pane. 





JetBrains - DataGrip


To configure the JetBrains database tool to connect with single sign-on, change the "Authentication" setting to "Authenticator" and put "externalbrowser" in the "Authenticator" field.  

https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-use.html#browser-based-sso





On the "Advanced" tab set the role to use during your connection. 


The "Name" is "role" and the value is the name of the Snowflake role.  This is the name of the group / role that the user is made a member of when their account is provisioned by IT or other roles inherited from those role assignments.