Skip to content

Snowflake

Loads data directly into Snowflake tables.

For a full end-to-end walkthrough, see the Snowflake Quick Start.

Configuration

yaml
warehouse:
  kind: snowflake
  database: ANALYTICS
  schema: RAW
  warehouse: COMPUTE_WH
  role: ACCOUNTADMIN
FieldDefaultDescription
database(required)Snowflake database
schema(required)Target schema
warehouseCompute warehouse
roleSnowflake role

CLI

bash
skippr connect warehouse snowflake \
  --database ANALYTICS \
  --schema RAW \
  --warehouse COMPUTE_WH \
  --role ACCOUNTADMIN

Or run without flags to be prompted interactively.

FlagDescription
--databaseSnowflake database name
--schemaBronze/raw schema where extracted data lands
--warehouseCompute warehouse
--roleRole with appropriate grants

Config output

Running connect warehouse snowflake writes the following to skippr.yaml:

yaml
warehouse:
  kind: snowflake
  database: ANALYTICS
  schema: RAW
  warehouse: COMPUTE_WH
  role: ACCOUNTADMIN

Authentication

Authentication is always via environment variables — credentials are never stored in the config file.

VariableDescription
SNOWFLAKE_ACCOUNTAccount identifier (e.g. MYORG-MYACCOUNT or xy12345.us-east-1)
SNOWFLAKE_USERLogin username (or service account name)
SNOWFLAKE_PRIVATE_KEY_PATHPath to .p8 private key file (key-pair auth, recommended)
SNOWFLAKE_PASSWORDPassword (only when MFA is not enforced)

Key-pair auth is recommended and required when MFA is enabled on the Snowflake account. It works with both regular user accounts and service accounts.

Install OpenSSL (Windows)

OpenSSL is pre-installed on macOS and most Linux distributions. On Windows, install it first:

powershell
winget install OpenSSL

Restart your terminal after installing so the openssl command is available.

Generate the key pair

bash
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out snowflake_key.p8 -nocrypt
openssl rsa -in snowflake_key.p8 -pubout -out snowflake_key.pub

Assign the public key

For a regular user account:

sql
ALTER USER myuser SET RSA_PUBLIC_KEY='MIIBIjANBgkqh...';

For a service account (see below):

sql
ALTER USER skippr_svc SET RSA_PUBLIC_KEY='MIIBIjANBgkqh...';

Set the environment variable

bash
export SNOWFLAKE_PRIVATE_KEY_PATH="/path/to/snowflake_key.p8"
powershell
$env:SNOWFLAKE_PRIVATE_KEY_PATH = "C:\path\to\snowflake_key.p8"

Service account authentication

A Snowflake service account is a dedicated, non-interactive user designed for automated workloads like Skippr. Using a service account means:

  • No impact on personal accounts — the service user is separate from human users, so MFA policies, password rotations, and account lockouts don't interrupt pipelines.
  • Least-privilege by default — grant only the specific roles and warehouses Skippr needs.
  • Audit clarity — all Skippr activity appears under a distinct user in Snowflake's query history.

Create the service account

sql
CREATE USER skippr_svc
  TYPE = SERVICE
  DEFAULT_ROLE = SKIPPR_ROLE
  DEFAULT_WAREHOUSE = COMPUTE_WH
  RSA_PUBLIC_KEY = 'MIIBIjANBgkqh...';

CREATE ROLE SKIPPR_ROLE;
GRANT ROLE SKIPPR_ROLE TO USER skippr_svc;

Then grant the required privileges to SKIPPR_ROLE.

Environment variables

bash
export SNOWFLAKE_ACCOUNT="MYORG-MYACCOUNT"
export SNOWFLAKE_USER="skippr_svc"
export SNOWFLAKE_PRIVATE_KEY_PATH="/path/to/snowflake_key.p8"

Everything else works the same — skippr connect warehouse snowflake, skippr run, etc.

Required grants

The role needs:

  • USAGE on the warehouse
  • USAGE on the database
  • USAGE and CREATE TABLE on the raw schema
  • CREATE SCHEMA on the database (for silver/gold schema creation)

Example grants for a dedicated role:

sql
GRANT USAGE ON WAREHOUSE COMPUTE_WH TO ROLE SKIPPR_ROLE;
GRANT USAGE ON DATABASE ANALYTICS TO ROLE SKIPPR_ROLE;
GRANT USAGE ON SCHEMA ANALYTICS.RAW TO ROLE SKIPPR_ROLE;
GRANT CREATE TABLE ON SCHEMA ANALYTICS.RAW TO ROLE SKIPPR_ROLE;
GRANT CREATE SCHEMA ON DATABASE ANALYTICS TO ROLE SKIPPR_ROLE;

Troubleshooting

SymptomFix
Failed to connect: 250001Check the SNOWFLAKE_ACCOUNT format — use the org-account form (e.g. MYORG-MYACCOUNT) or include the region (e.g. xy12345.us-east-1)
Incorrect username or passwordVerify SNOWFLAKE_USER and auth env vars
Insufficient privilegesEnsure the role has the grants listed above
390197 — Multi-factor authentication is requiredSwitch to key-pair auth — password auth cannot work when MFA is enforced
openssl: command not foundInstall OpenSSL — on Windows: winget install OpenSSL, then restart your terminal

Further reading

CDC

Snowflake supports CDC with exactly-once MERGE semantics. Skippr automatically creates _skippr_order_token columns and tombstone tables.

See CDC Destinations -- Snowflake for details.