Skip to main content

Snowflake

Overview

The Snowflake source connector syncs data from Snowflake to your chosen destination. It supports Full Refresh and Incremental syncs using user-defined cursor fields.

The connector uses the Snowflake JDBC driver to connect to your Snowflake instance.

Output schema

The Snowflake source does not alter the schema present in your warehouse. Depending on the destination connected to this source, however, the result schema may be altered. See the destination's documentation for more details.

Features

FeatureSupportedNotes
Full Refresh SyncYes
Incremental - Append SyncYes
NamespacesYes

Getting started

Requirements

To configure the Snowflake source, you need:

  1. Host - The host domain of your Snowflake instance, including the account, region, and cloud environment. Must end with snowflakecomputing.com. Example: accountname.us-east-2.aws.snowflakecomputing.com
  2. Role - A Snowflake role with read access to the schemas you want to replicate.
  3. Warehouse - The Snowflake warehouse to use for running queries.
  4. Database - The Snowflake database containing the data to replicate.
  5. Schema (Optional) - The specific schema to replicate. If left empty, the connector discovers tables from all schemas you have access to.
  6. Authentication - Either username and password or key pair credentials.
  7. JDBC URL Params (Optional) - Additional JDBC connection properties, formatted as key=value pairs separated by &.

Setup guide

Create a dedicated read-only user

This step is optional but highly recommended for better permission control and auditing. Alternatively, you can use an existing Snowflake user.

Run the following SQL commands in Snowflake to create a dedicated user and role:

-- Set variables (these need to be uppercase)
SET AIRBYTE_ROLE = 'AIRBYTE_ROLE';
SET AIRBYTE_USERNAME = 'AIRBYTE_USER';
SET AIRBYTE_PASSWORD = '-password-';
SET AIRBYTE_WAREHOUSE = 'AIRBYTE_WAREHOUSE';
SET AIRBYTE_DATABASE = 'YOUR_DATABASE';
SET AIRBYTE_SCHEMA = 'YOUR_SCHEMA';

BEGIN;

-- Create Airbyte role
CREATE ROLE IF NOT EXISTS IDENTIFIER($AIRBYTE_ROLE);

-- Create Airbyte user
CREATE USER IF NOT EXISTS IDENTIFIER($AIRBYTE_USERNAME)
PASSWORD = $AIRBYTE_PASSWORD
DEFAULT_ROLE = $AIRBYTE_ROLE
DEFAULT_WAREHOUSE = $AIRBYTE_WAREHOUSE;

-- Grant the role to the user
GRANT ROLE IDENTIFIER($AIRBYTE_ROLE) TO USER IDENTIFIER($AIRBYTE_USERNAME);

-- Grant read access
GRANT USAGE ON WAREHOUSE IDENTIFIER($AIRBYTE_WAREHOUSE) TO ROLE IDENTIFIER($AIRBYTE_ROLE);
GRANT USAGE ON DATABASE IDENTIFIER($AIRBYTE_DATABASE) TO ROLE IDENTIFIER($AIRBYTE_ROLE);
GRANT USAGE ON SCHEMA IDENTIFIER($AIRBYTE_DATABASE || '.' || $AIRBYTE_SCHEMA) TO ROLE IDENTIFIER($AIRBYTE_ROLE);
GRANT SELECT ON ALL TABLES IN SCHEMA IDENTIFIER($AIRBYTE_DATABASE || '.' || $AIRBYTE_SCHEMA) TO ROLE IDENTIFIER($AIRBYTE_ROLE);
GRANT SELECT ON FUTURE TABLES IN SCHEMA IDENTIFIER($AIRBYTE_DATABASE || '.' || $AIRBYTE_SCHEMA) TO ROLE IDENTIFIER($AIRBYTE_ROLE);

COMMIT;

To replicate data from multiple schemas, repeat the GRANT USAGE ON SCHEMA and GRANT SELECT statements for each schema.

Connection parameters

For additional JDBC connection parameters, see the Snowflake JDBC documentation.

Authentication

The connector supports two authentication methods.

Username and password

Provide your Snowflake username and password in the connector configuration.

Key pair authentication

To configure key pair authentication, you need a private/public key pair. If you don't have the key pair yet, you can generate one using the openssl command line tool. Use this command to generate an unencrypted private key file:

openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt

Alternatively, use this command to generate an encrypted private key file:

openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -v2 aes-256-cbc -out rsa_key.p8

Once you have your private key, you need to generate a matching public key. You can do so with the following command:

openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub

Finally, you need to add the public key to your Snowflake user account. You can do so with the following SQL command in Snowflake. Replace <user_name> with your user name and <public_key_value> with your public key.

alter user <user_name> set rsa_public_key=<public_key_value>;

If you need help troubleshooting key pair authentication, see Snowflake's troubleshooting docs.

Network policies

By default, Snowflake allows connections from any IP address. If your Snowflake account uses network policies, you must allow the IP addresses used by Airbyte.

If you use Airbyte Cloud, add the Airbyte Cloud IP addresses to your Snowflake network policy's allowed list.

To check whether a network policy is set on your account or for a specific user:

-- Check account-level network policy
SHOW PARAMETERS LIKE 'network_policy' IN ACCOUNT;

-- Check user-level network policy
SHOW PARAMETERS LIKE 'network_policy' IN USER <username>;

Advanced configuration

The connector exposes several optional settings for fine-tuning sync behavior:

SettingDescriptionDefault
ConcurrencyMaximum number of concurrent queries to Snowflake during a sync. Increasing this value can improve throughput for databases with many tables.1
Checkpoint Target Time IntervalHow often, in seconds, the connector checkpoints sync progress. Lower values produce more frequent state messages, which can improve recovery time if a sync is interrupted.300
Check Table and Column Access PrivilegesWhen enabled, the connector tests access to each table individually during schema discovery and excludes inaccessible tables. In large schemas, disabling this can speed up discovery.Enabled

Data type mapping

The connector maps Snowflake data types to Airbyte types as follows:

Snowflake typeAirbyte typeNotes
VARCHAR, CHAR, CHARACTER, STRING, TEXTString
BOOLEANBoolean
NUMBER, DECIMAL, NUMERICNumber
INT, INTEGERInteger
BIGINTInteger
SMALLINT, TINYINTInteger
FLOAT, FLOAT4, FLOAT8, DOUBLE, DOUBLE PRECISION, REALNumber
DATEDate
TIMETime
TIMESTAMP_NTZ, TIMESTAMP, DATETIMETimestamp without timezoneTruncated to microsecond precision
TIMESTAMP_TZ, TIMESTAMP_LTZTimestamp with timezoneConverted to UTC. Truncated to microsecond precision
BINARY, VARBINARYString (base64)
VARIANT, OBJECT, ARRAYString (JSON)
GEOGRAPHY, GEOMETRY, VECTOR, FILEString

Timestamp precision

Snowflake supports timestamp precision up to 9 decimal places (nanoseconds). The connector truncates all timestamp values to 6 decimal places (microseconds) to ensure compatibility with destinations that do not support nanosecond precision.

This truncation applies to TIMESTAMP_NTZ, TIMESTAMP, DATETIME, TIMESTAMP_TZ, and TIMESTAMP_LTZ columns.

Timezone handling

Snowflake's TIMESTAMP_TZ and TIMESTAMP_LTZ types are converted to UTC during replication. The original timezone offset is not preserved.

TIMESTAMP_NTZ and its synonym DATETIME are replicated without any timezone conversion.

Incremental sync

The connector supports incremental sync using a user-defined cursor field.

During each sync, the connector queries only records where the cursor value is greater than the last-synced value. Choose a cursor field that is monotonically increasing and never updated after creation, such as a CREATED_AT timestamp or an auto-incrementing ID.

Reference

Config fields reference

Field
Type
Property name
string
database
string
host
string
role
string
warehouse
boolean
check_privileges
integer
checkpoint_target_interval_seconds
integer
concurrency
object
credentials
object
cursor
string
jdbc_url_params
string
schema

Changelog

Expand to review
VersionDatePull RequestSubject
1.0.102026-03-1874834Truncate timestamp precision to 6 digits (microseconds) to prevent precision errors in destinations
1.0.92025-09-1674081Security update
1.0.82025-09-1666311Change CDK version to 0.1.31
1.0.72025-09-1666200Fix sampling bug for DefaultJdbcCursorIncrementalPartition
1.0.62025-09-1266226Fix schema filtering functionality in versions 1.0.0+ - resolves "discovered zero tables" error and enables proper schema-level filtering
1.0.52025-07-2863780Fix ts data type for snowflake
1.0.32025-07-2263713Revert base image from 2.0.3 to 2.0.2 to fix SSL certificate errors
1.0.22025-07-1462939Update base image to 2.0.3
1.0.12025-07-1162929Update test dependencies
1.0.02025-06-2461535Replace community support connector with Airbyte certified connector
0.3.62025-01-1051504Use a non root base image
0.3.52024-12-1849911Use a base image: airbyte/java-connector-base:1.0.0
0.3.42024-10-3148073Upgrade jdbc driver
0.3.32024-06-2840424Support Snowflake key pair authentication
0.3.22024-02-1338317Hide oAuth option from connector
0.3.12024-02-1335220Adopt CDK 0.20.4
0.3.12024-01-2434453bump CDK version
0.3.02023-12-1833484Remove LEGACY state
0.2.22023-10-2031613Fixed handling of TIMESTAMP_TZ columns. upgrade
0.2.12023-10-1131252Snowflake JDBC version upgrade
0.2.02023-06-2627737License Update: Elv2
0.1.362023-06-2027212Fix silent exception swallowing in StreamingJdbcDatabase
0.1.352023-06-1427335Remove noisy debug logs
0.1.342023-03-3024693Fix failure with TIMESTAMP_WITH_TIMEZONE column being used as cursor
0.1.332023-03-2924667Fix bug which wont allow TIMESTAMP_WITH_TIMEZONE column to be used as a cursor
0.1.322023-03-2220760Removed redundant date-time datatypes formatting
0.1.312023-03-0623455For network isolation, source connector accepts a list of hosts it is allowed to connect to
0.1.302023-02-2122358Improved handling of big integer cursor type values.
0.1.292022-12-1420346Consolidate date/time values mapping for JDBC sources.
0.1.282023-01-0620465Improve the schema config field to only discover tables from the specified scehma and make the field optional
0.1.272022-12-1420407Fix an issue with integer values converted to floats during replication
0.1.262022-11-1019314Set application id in JDBC URL params based on OSS/Cloud environment
0.1.252022-11-1015535Update incremental query to avoid data missing when new data is inserted at the same time as a sync starts under non-CDC incremental mode
0.1.242022-09-2617144Fixed bug with incorrect date-time datatypes handling
0.1.232022-09-2617116added connection string identifier
0.1.222022-09-2116766Update JDBC Driver version to 3.13.22
0.1.212022-09-1415668Wrap logs in AirbyteLogMessage
0.1.202022-09-0116258Emit state messages more frequently
0.1.192022-08-1915797Allow using role during oauth
0.1.182022-08-1814356DB Sources: only show a table can sync incrementally if at least one column can be used as a cursor field
0.1.172022-08-0915314Discover integer columns as integers rather than floats
0.1.162022-08-0415314(broken, do not use) Discover integer columns as integers rather than floats
0.1.152022-07-2214828Source Snowflake: Source/Destination doesn't respect DATE data type
0.1.142022-07-2214714Clarified error message when invalid cursor column selected
0.1.132022-07-1414574Removed additionalProperties:false from JDBC source connectors
0.1.122022-04-2912480Query tables with adaptive fetch size to optimize JDBC memory consumption
0.1.112022-04-2710953Implement OAuth flow
0.1.92022-02-2110242Fixed cursor for old connectors that use non-microsecond format. Now connectors work with both formats
0.1.82022-02-1810242Updated timestamp transformation with microseconds
0.1.72022-02-1410256Add -XX:+ExitOnOutOfMemoryError JVM option
0.1.62022-01-259623Add jdbc_url_params support for optional JDBC parameters
0.1.52022-01-199567Added parameter for keeping JDBC session alive
0.1.42021-12-309203Update connector fields title/description
0.1.32021-01-119304Upgrade version of JDBC driver
0.1.22021-10-217257Fixed parsing of extreme values for FLOAT and NUMBER data types
0.1.12021-08-134699Added json config validator