Overview

Use Snowflake as a destination in Mage to load structured data into your cloud data warehouse. Mage supports both row-by-row insertion and batch upload modes, and integrates with Snowflake using username/password or key-pair authentication.

This destination is ideal for exporting transformed pipeline data for analytics, BI tools, or data lakehouse modeling.


Required Configuration

Provide the following credentials when configuring Snowflake as a destination:

KeyDescriptionExample ValueRequired
accountYour Snowflake account identifier.abc1234.us-east-1
databaseName of the Snowflake database to write to.DEMO_DB
schemaSchema within the database where the table will be created.PUBLIC
tableTarget table that Mage will create or insert into.dim_users_v1
usernameSnowflake user with INSERT and CREATE TABLE permissions.guest
warehouseVirtual warehouse used to execute queries and ingest data.COMPUTE_WH
use_batch_loadIf true, enables batch loading instead of row-by-row inserts. Recommended for performance.true (default)
disable_double_quotesIf true, column and table names will not be wrapped in double quotes. Disabling may reduce case-sensitivity issues.false (default)

Optional Connection Parameters

KeyDescriptionExample Value
passwordPassword for the Snowflake user.abc123...
private_key_filePath to the private key file for key-pair authentication (requires version ≥ 0.9.76)./path/to/key.p8
private_key_file_pwdPassphrase for the private key file.abc123...
roleSnowflake role to use for the session.ANALYST_ROLE

🔐 Enable key-pair authentication →


Optional Mage Settings

KeyDescriptionExample Value
skip_schema_creationIf true, Mage will skip running the CREATE SCHEMA command. Useful if the schema already exists. See issuetrue
lower_caseIf true, Mage will convert all column names to lowercase. Default is true.true

Notes

  • Set use_batch_load: true for large datasets to improve performance and reduce API calls.
  • When using key-pair authentication, ensure the private key is generated and stored securely.
  • If disable_double_quotes is false, column names will retain their case. Otherwise, names will be treated as case-insensitive.
  • Make sure your user has permission to create tables and write to the specified schema in the selected database and warehouse.