Help › Connect to databases

Connect to Snowflake

Connect to Snowflake with a key pair or a token, set the role and warehouse, and what is particular to Snowflake in Querlyn.

Querlyn 0.1.0 is not released yet. This help describes it ahead of release.

Querlyn talks to Snowflake through Snowflake's SQL API. That decides how you sign in and what a query tab can do, so read What is particular to Snowflake before you rely on it.

Note: The SQL API has no password sign-in. You need a key pair or a token; a user name and password alone, multi-factor prompts and browser single sign-on do not work.

What you need

  • Your account identifier, for example myorg-myaccount.
  • Your Snowflake user name.
  • One of: an RSA key pair whose public key is set on your user, a programmatic access token, or an OAuth token.
  • Optionally the role, warehouse, database and schema to work with.

Fill in the dialog

  1. Choose File › New Connection… and, under Database engine, Snowflake.

  2. Under Account, enter the account identifier. You can also paste the account's host name or its URL. Port stays 443.

  3. Enter the Database (optional) and the User.

  4. Under Sign in with, choose the method and fill in what it needs:

    Sign in withWhat to enter
    Key pairPrivate key file: the private key whose public key is set on the user. Querlyn reads the file each time it connects and keeps only its path. If the key is encrypted, enter its passphrase under Key passphrase.
    Access tokenA programmatic access token, under Access token.
    OAuth tokenAn OAuth access token you obtained elsewhere, under OAuth token. Querlyn does not run the OAuth sign-in itself.
  5. Above the passphrase or token, choose where it is kept: the keychain, asked every time, or a password manager. See Choose where passwords are kept.

  6. Enter Role, Warehouse and Schema, or leave them empty for your user's defaults.

  7. Choose Test Connection, then Save & Connect.

Account name for sign-in is only for a key pair used through a host that is not Snowflake's own, such as a proxy or a private DNS name: enter the account identifier the key belongs to.

Connections to Snowflake's own hosts are always encrypted and verified; other TLS choices are refused for them.

A key pair signs a token that works for your whole account until it runs out, so it is sent only over Verify full, and only to Snowflake's own names (ending in .snowflakecomputing.com or .snowflakecomputing.cn) unless you turn on Send sign-in tokens to this host for a proxy or a private name of your own. That choice is kept on this computer only (see Where tokens are sent). An access token or OAuth token is your own secret, like a password, and goes where the connection says.

What is particular to Snowflake

  • Each run is a session of its own. Querlyn sends everything you run at once as one request, and Snowflake treats each request as a new session. So a transaction cannot stay open from one run to the next: the tab's Auto-commit control cannot be changed, and Begin Transaction says why. To group statements, select BEGIN, the statements and COMMIT together and run the selection.
  • The role, warehouse, database and schema carry over. Each tab remembers them between runs. Change the database with the database button in the bar above the editor (see Choose a tab's connection and database), or any of them in the tab with USE ROLE, USE WAREHOUSE, USE DATABASE or USE SCHEMA; the role and the warehouse have no switcher in the bar.
  • Results of several statements arrive together, when the whole run has finished.
  • Rows cannot be edited in the results, because an edit needs a transaction that stays open.
  • Browsing costs no compute. The sidebar reads names with SHOW and DESCRIBE, which need no running warehouse. It lists every database, and at most 10,000 objects of one kind in a schema.
  • Names carry their database. A table opened from the sidebar is named DATABASE.SCHEMA.TABLE, so the statement reads that table whichever database its tab is in.
  • More kinds of objects are listed: streams, stages, file formats, pipes and tasks have folders of their own.
  • Keys are not enforced, and the sidebar says so. Snowflake records primary, unique and foreign keys and enforces only NOT NULL.
  • PUT and GET are refused. They move files between your computer and a stage, which the SQL API cannot do. Use Snowflake's own command-line tool for the files, then COPY INTO in Querlyn.
  • Server Activity lists queries, running, queued or blocked, not sessions, and needs a warehouse.
  • Read-only is Querlyn's check. A role without write privileges is the stronger guard.
  • Parameters are written ? or :name.

What Querlyn does not do

  • Password, multi-factor and browser sign-in.
  • Explain Analyze: Explain shows the plan Snowflake estimates.
  • Backup and restore: Time Travel and clones are Snowflake's own answer.
  • The "blocking others" notice, lock and statement timeouts, and migration lock warnings.

Help for Querlyn 0.1.0. All help topics