Docs
Sign in

Snowflake

Snowflake is a cloud data warehouse. The Snowflake connector lets TAO explore your databases and run read-only queries, and it can also show what your warehouse costs.

Screenshot to add: The Add Snowflake form with Programmatic Access Token, Account identifier or host, User, Role and Warehouse fields.

What you can do

Illustrative examples.

  • Ask Nexus which tables exist in a schema, and what is in them.
  • Preview a few rows of a table, or count its rows.
  • Profile one column: how many values, how many blanks, the smallest and largest.
  • Check how many credits (Snowflake's billing unit) your warehouse used last week.
  • Look at a scheduled task's definition.

Before you connect

You need a Programmatic Access Token. This is a long secret that stands in for a password. You create it on your own user's Programmatic Access Tokens page in Snowflake. You do not need to be an account administrator to make your own.

You also need four details:

FieldWhat to enter
Account identifier or hostYour account identifier, which looks like orgname-accountname, or the full host. TAO adds snowflakecomputing.com to a bare identifier
UserThe Snowflake user the token was created for
RoleThe exact role the token is restricted to, spelled as Snowflake shows it
WarehouseThe warehouse TAO should run SQL on

None of these is guessed. The warehouse is never defaulted, because Snowflake bills the warehouse that is actually used.

Connect it

  1. Create the token in Snowflake

    On your Snowflake user, open the Programmatic Access Tokens page and create a token restricted to your chosen role. Copy it. Paste just the token later, not an Authorization header or a URL.

  2. Open Connectors

    In TAO, go to Settings > Connectors, find Snowflake and click Connect.

  3. Fill in the form

    Paste the token, then fill in Account identifier or host, User, Role and Warehouse. All are required.

  4. Save

    Save the connection. The token is stored encrypted and is not shown again.

An administrator must switch the Snowflake connector on first. It is created switched off.

Tools

Tool nameWhat it doesRead or Write
snowflake_list_databasesLists databases the role can see. No warehouse neededRead
snowflake_list_schemasLists schemas in one databaseRead
snowflake_list_tablesLists tables in one schemaRead
snowflake_describe_tableShows one table's own recordRead
snowflake_search_objectsFinds tables in a schema by a name pattern (% and _ wildcards)Read
snowflake_run_queryRuns one read-only SELECT. Uses warehouse creditsRead
snowflake_get_query_resultChecks or re-fetches an earlier query by its statement handleRead
snowflake_cancel_queryCancels a statement this session startedWrite, runs at once (no approval)
snowflake_preview_tableShows a few rows of a table. Uses creditsRead
snowflake_row_countGives the exact row count of a table. Uses creditsRead
snowflake_column_profileCounts, distinct, nulls, min and max for one column. Uses creditsRead
snowflake_list_warehousesLists warehouses and whether each is started or suspendedRead
snowflake_describe_warehouseShows one warehouse's state and sizeRead
snowflake_query_historyRecent queries on the account, from Snowflake's usage historyRead
snowflake_warehouse_credit_usageWhat the warehouse has cost, from Snowflake's metering historyRead
snowflake_list_tasksLists scheduled tasks in a schemaRead
snowflake_describe_taskShows one task's schedule, warehouse and SQLRead

Total: 17 tools. 16 read, 1 that cancels a running query. No tool changes your data, and no tool waits for approval.

Limits and good to know

  • Read-only SQL. A statement must be one SELECT or WITH ... SELECT. Anything with a semicolon or a data-changing keyword is refused. A row limit (default 500, up to 5000) and an ORDER BY are enforced for you.
  • Suspended warehouses are not woken. Snowflake charges a 60-second minimum each time a warehouse resumes. So tools that run SQL refuse if the warehouse is not started. Resume it yourself, then try again.
  • Some tools cost credits. Metadata listing is free. Queries, previews, row counts, column profiles, query history and credit usage run on your warehouse and spend credits.
  • Usage history can lag. Query history and credit usage come from Snowflake's own usage views. They can be hours behind. They also need your role to have been granted access. An access error there is a permission issue, not a fault.
  • Counts differ in the product notes. The tool list holds 17 tools. A code comment in the gateway says "16 reads + 1 mutating", which matches: 16 plus the cancel tool.
  • No write tools exist, so there is nothing to approve for this connector.