Skip to content
Maua.Culturewire

Snowflake

Cloud data warehouse: SQL queries through the SQL API

Data and analyticsCatalog1 tool · 0 triggers

Managed auth

Authentication

Methods your end users can connect with. Credentials are stored encrypted, and secret values are never shown again or returned by the API.

  • API key

    Your users enter

    • Your Snowflake account URLRequiredHTTPS URL
    • Programmatic access token (PAT)SecretRequired

    Where to find them

    1. Connects with a programmatic access token (PAT), without a username or password.
    2. Find the account URL: in Snowsight, your user menu (bottom left) → your account → “View account details” or “Copy account URL” (it looks like https://myorg-myaccount.snowflakecomputing.com).
    3. Generate the token: “Governance & security” → “Users & roles” → your user (or a service user) → “Programmatic access tokens” → “Generate new token”. Choose the role it is restricted to (the token will only have its permissions) and copy the secret: it is shown only once.
    4. Snowflake requires the user to be subject to a network policy that allows the IP addresses requests come from; otherwise authentication fails. The token expires (after 15 days by default).

Tools (1)

  • Snowflake API requestSNOWFLAKE_SEND_REQUEST

    Authenticated call to the Snowflake API ({url}). Any endpoint of the API is allowed. Examples: POST /api/v2/statements {"statement": "SELECT * FROM my_table LIMIT 10", "warehouse": "MY_WAREHOUSE", "database": "MY_DB", "schema": "PUBLIC", "role": "MY_ROLE", "timeout": 60} (the result is in data; if it is large, it arrives in parts: GET /api/v2/statements/{statementHandle}?partition=1), POST /api/v2/statements?async=true (returns the statementHandle without waiting), GET /api/v2/statements/{statementHandle} (status and result), POST /api/v2/statements/{statementHandle}/cancel, GET /api/v2/databases (databases visible to the role).

    Required scopes

    No scopes required

    Input

    Snowflake API request input
    NameTypeDescription
    methodstringHTTP methodOne of: GET, POST, PUT, PATCH, DELETEDefault: "GET"
    pathrequiredstringPath relative to the API base URL, or a full URL on the same API (e.g. a next-page link)
    queryobjectQuery string parameters
    bodyunknownJSON body
    formobjectBody as application/x-www-form-urlencoded instead of JSON
    body_base64stringBinary body, base64 (at most 960000 characters)
    content_typestringContent-Type of body_base64
    headersobjectExtra headers such as Accept. Authentication is added automatically.