Skip to content

Connect data

Snowflake

Connect Snowflake tables and views to use them in dashboards and reports. Syncs run queries on the Snowflake warehouse you choose, so they use its compute credits.

You need a Snowflake administrator to create a read-only service user. It can sign in with a key pair or a programmatic access token.

Have your warehouse, database and schema names ready, copied exactly as they appear in Snowflake, including capitalization. To find your account identifier, run this in a Snowflake worksheet:

SELECT CURRENT_ORGANIZATION_NAME() || '-' || CURRENT_ACCOUNT_NAME() AS account_identifier;

The result, such as MYORG-ANALYTICS, goes in the Account identifier field. Leave off https:// and .snowflakecomputing.com. For other account formats, see Snowflake’s connection settings guide.

Ask your administrator to run this SQL with a role that can create users and grant these permissions. Replace <your_warehouse>, <your_database> and <your_schema> with the exact names stored in Snowflake, keeping the double quotes around them.

Names created without quotes are stored in uppercase, so use "COMPUTE_WH" for a warehouse created as compute_wh. If a name contains a double quote, double it inside the identifier: Sales"West becomes "Sales""West". See Snowflake’s identifier rules.

CREATE ROLE IF NOT EXISTS RESPLENDENT_SYNC_ROLE;
GRANT USAGE ON WAREHOUSE "<your_warehouse>" TO ROLE RESPLENDENT_SYNC_ROLE;
GRANT USAGE ON DATABASE "<your_database>" TO ROLE RESPLENDENT_SYNC_ROLE;
GRANT USAGE ON SCHEMA "<your_database>"."<your_schema>" TO ROLE RESPLENDENT_SYNC_ROLE;
GRANT SELECT ON ALL TABLES IN SCHEMA "<your_database>"."<your_schema>" TO ROLE RESPLENDENT_SYNC_ROLE;
GRANT SELECT ON ALL VIEWS IN SCHEMA "<your_database>"."<your_schema>" TO ROLE RESPLENDENT_SYNC_ROLE;
GRANT SELECT ON FUTURE TABLES IN SCHEMA "<your_database>"."<your_schema>" TO ROLE RESPLENDENT_SYNC_ROLE;
GRANT SELECT ON FUTURE VIEWS IN SCHEMA "<your_database>"."<your_schema>" TO ROLE RESPLENDENT_SYNC_ROLE;
CREATE USER IF NOT EXISTS RESPLENDENT_SYNC
TYPE = SERVICE
DEFAULT_ROLE = RESPLENDENT_SYNC_ROLE
DEFAULT_WAREHOUSE = "<your_warehouse>";
GRANT ROLE RESPLENDENT_SYNC_ROLE TO USER RESPLENDENT_SYNC;

These grants let Resplendent read the schema’s existing tables and views, and any created later. For another schema, repeat the USAGE ON SCHEMA grant and the four SELECT grants with its name.

Choose one method for the service user.

  1. Generate a private key and its public key on your computer:

    Terminal window
    openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt
    openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub
  2. Keep rsa_key.p8 private. You upload it to Resplendent when you connect.

  3. Open rsa_key.pub and copy the key body, leaving out the BEGIN PUBLIC KEY and END PUBLIC KEY lines.

  4. Register it on the service user:

    ALTER USER RESPLENDENT_SYNC SET RSA_PUBLIC_KEY='<paste_public_key_body_here>';

If your organization requires an encrypted private key, follow Snowflake’s key-pair setup instructions and enter its passphrase in Resplendent.

Ask your administrator to confirm that the service user’s authentication policy allows programmatic access tokens. By default Snowflake requires a network policy for service-user tokens. If one applies, it must allow Resplendent’s servers; ask support@resplendentdata.com for the current IP addresses.

  1. Create a token restricted to the read-only role:

    ALTER USER RESPLENDENT_SYNC ADD PROGRAMMATIC ACCESS TOKEN resplendent
    ROLE_RESTRICTION = 'RESPLENDENT_SYNC_ROLE'
    DAYS_TO_EXPIRY = 90;
  2. Choose an expiry your authentication policy allows.

  3. Copy the token from the results right away. Snowflake shows it once.

See Snowflake’s token guide for policy requirements.

Before the token expires, create a replacement with a new name and update it on your Resplendent connection. Once the connection works with the new token, remove the old one:

ALTER USER RESPLENDENT_SYNC REMOVE PROGRAMMATIC ACCESS TOKEN resplendent;
  1. Open Settings → Integrations, find Snowflake and click Connect.
  2. Choose Key pair or Access token.
  3. For a key pair, upload the Private key file or paste it into Private key (PEM), including its header and footer lines. Fill in Key passphrase (optional) only if the key is encrypted. For a token, paste it into Programmatic access token.
  4. Fill in the fields from the table below, and enter a Connection Title.
  5. Click Save & Test.
  6. When the test passes, click Sync Dataset and choose the tables or views to sync.
Field What to enter
Account identifier The value from Before you start, such as MYORG-ANALYTICS
Username RESPLENDENT_SYNC
Warehouse The warehouse you granted access to
Database The database that holds your tables and views
Schema Optional. A fixed schema, or leave it blank to browse schemas when you add Datasets
Role Optional. RESPLENDENT_SYNC_ROLE

If you left Schema blank, use the schema selector above the Tables and Views tabs to browse one schema at a time. Each Dataset keeps its schema-qualified name after you add it.

Open SQL Studio from the Snowflake Dataset picker to look at source data before you pull a Dataset. It runs one read-only SELECT, WITH … SELECT or Snowflake SHOW statement at a time. Use SHOW to list schemas, tables or views before you write a SELECT.

  • Results show up to 1,000 rows, and each statement can run for up to five minutes.
  • Export CSV downloads the rows on screen. Running a query doesn’t save it, but Snowflake still records it in its query history.
  • SQL Studio runs with the connection’s role, so Snowflake’s grants decide what’s visible. Keep the role read-only and grant only what Resplendent users should explore.
  • Only users with full Dataset access can open SQL Studio.

Run a SELECT or WITH … SELECT, then click Use as Dataset. Name the Dataset, confirm its columns, and use Options to set the snapshot row limit and refresh interval. A custom SELECT Dataset defaults to 500 rows every 180 minutes, syncs as a snapshot only, and needs no primary key or update column.

Use an outer ORDER BY to choose which rows are kept, with a tie-breaker so results are predictable. Don’t put an outer LIMIT, TOP, OFFSET or FETCH in the saved SQL: the snapshot row limit sets the final size. Limits inside subqueries are fine. For example:

SELECT report_date, source_id, TO_JSON(payload) AS payload_json
FROM REPORTING.REPORTS
ORDER BY report_date DESC, source_id DESC

Every refresh reruns the query and replaces the Dataset after a successful read; older results don’t accumulate. A failed read leaves the existing data in place. The row limit counts result rows, and one JSON payload can hold many nested records. Use a Query Dataset to expand JSON after it lands.

To change the SQL, open the Dataset editor and click Edit source SQL. Run a successful preview, click Apply SQL, review the columns, then click Save & Close. The change isn’t saved until that last step, and it triggers a fresh snapshot.

Custom SELECT Datasets work on cloud Snowflake connections only, with a snapshot limit from 1 to 100,000 rows. SHOW statements are preview-only. Only users with full Dataset access can create or change source SQL.

Each table or view you add becomes a Dataset.

  • Incremental syncing needs a primary key that identifies each row and a sorting column that advances whenever a row is edited, such as an updated timestamp. A creation date alone misses later edits. Scheduled syncs fetch rows from the latest synced value onward, hourly by default. Adjust the interval in Dataset Options to balance freshness against Snowflake costs.
  • Snapshot syncing also uses an id column and a sorting column, but the id doesn’t need to be unique. The sorting column orders each pull newest first.

The first sync loads one batch, 1,000 rows by default, and later syncs load more history according to the Dataset’s history settings. You can raise the batch size to 500,000 rows. Smaller batches help queries finish when the warehouse is busy or a view is slow.

Turn off Incremental Syncing in Dataset Options to replace the Dataset on every scheduled sync. Each refresh reads one batch of the newest rows, from 1,000 by default up to 500,000. Resplendent only runs read-only queries and never creates streams, stages or tables in your Snowflake account.

Incremental syncs don’t notice rows deleted in Snowflake. Resync the Dataset, or turn on Nightly Full Re-sync, to remove them. A resync replaces an incremental Dataset with its first batch, then reloads history, so reports can show fewer rows for a while.

Problem What to check
Connection fails The account identifier, and that the service user has the role above. For a key pair, the private key must match the public key on the user. For a token, check its expiry and role restriction.
Blocked by IP restrictions Ask your administrator to allow Resplendent’s sync servers. Contact support@resplendentdata.com for the addresses.
Tables or views missing The role needs USAGE on their database and schema and SELECT on the objects. A value in Schema also limits what’s listed.