Snowflake Batch Source

The Snowflake batch source plugin is available in the Hub.

Plugin version: 1.1.0

Reads data from Snowflake tables.

Configuration

Basic

Property

Macro Enabled?

Description

Property

Macro Enabled?

Description

Reference Name

No

Required. Name used to uniquely identify this source for lineage, annotating metadata, etc.

Account Name

Yes

Required. Snowflake account name and region and possibly a cloud specifier. Part of the URL you use to log in to Snowflake, minus the snowflakecomputing.com. For example, myaccount.us-central1.gcp.

Database

Yes

Required. Database that contains the source table.

Schema

Yes

Required. Schema that contains the source table.

Warehouse

Yes

Optional. Warehouse that provides the compute resources.

Role

Yes

Optional. Role to use (e.g. ACCOUNTADMIN).

Import Query

Yes

Required. Query for data import.

Credentials

Property

Macro Enabled?

Description

Property

Macro Enabled?

Description

Username

Yes

Optional. Username to use to connect to your Snowflake account.

Password

Yes

Optional. Password to use to connect to your Snowflake account. Not necessary for key pair or OAuth2 authentication.

Key Pair Authentication

Property

Macro Enabled?

Description

Property

Macro Enabled?

Description

Key Pair Authentication Enabled

No

Optional. If true, the plugin will perform key pair authentication.

Default is False.

Private Key

Yes

Optional. Private key contents.

Key File Passphrase

Yes

Optional. Passphrase for the private key file.

OAuth2

To use OAuth2, you must create a snowflake security integration for it. For more information, see Introduction to OAuth in Snowflake.

Property

Macro Enabled?

Description

Property

Macro Enabled?

Description

OAuth2 Enabled

No

Optional. If true, the plugin will perform OAuth2 authentication.

Default is False.

Client ID

Yes

Optional. Client ID obtained via system function SYSTEM$SHOW_OAUTH_CLIENT_SECRETS.

Client Secret

Yes

Optional. Client secret obtained via system function SYSTEM$SHOW_OAUTH_CLIENT_SECRETS.

Refresh Token

Yes

Optional. Token used to receive accessToken, which is end product of OAuth2. Must be generated by user.

Advanced

Property

Macro Enabled?

Description

Property

Macro Enabled?

Description

Maximum Split Size

Yes

Required. Maximum split size specified in bytes. If value is set to 0, then result is not split by Snowflake.

Default is 0.

Connection Arguments

Yes

Optional. List of arbitrary string tag/value pairs as connection arguments. See JDBC Driver Connection String.

Data Type Mapping

Snowflake Data Type

CDAP Schema Data Type

Comment

Snowflake Data Type

CDAP Schema Data Type

Comment

NUMBER

decimal

Default precision and scale are (38,0).

DECIMAL

decimal

Synonymous with NUMBER.

NUMERIC

decimal

Synonymous with NUMBER.

INT, INTEGER, BIGINT, SMALLINT

decimal

Synonymous with NUMBER, except that precision and scale cannot be specified (i.e. always defaults to NUMBER(38, 0)).

FLOAT, FLOAT4, FLOAT8

double

Snowflake uses double-precision (64 bit) IEEE 754 floating point numbers.

DOUBLE

double

Synonymous with FLOAT.

DOUBLE PRECISION

double

Synonymous with FLOAT.

REAL

double

Synonymous with FLOAT.

VARCHAR

string

Default (and maximum) is 16,777,216 bytes.

CHAR, CHARACTER

string

Synonymous with VARCHAR except default length is VARCHAR.

STRING

string

Synonymous with VARCHAR.

TEXT

string

Synonymous with VARCHAR.

BINARY

bytes

 

VARBINARY

bytes

Synonymous with BINARY.

BOOLEAN

boolean

 

DATE

date

 

DATETIME

timestamp

Alias for TIMESTAMP_NTZ

TIME

time

 

TIMESTAMP

timestamp/string

Alias for one of the TIMESTAMP variations (TIMESTAMP_NTZ by default).

TIMESTAMP_LTZ

timestamp

TIMESTAMP with local time zone; time zone, if provided, is not stored.

TIMESTAMP_NTZ

timestamp

TIMESTAMP with local time zone; time zone, if provided, is not stored.

TIMESTAMP_TZ

string

TIMESTAMP with time zone.

VARIANT

string

A tagged universal type, which can store values of any other type, including OBJECT and ARRAY, up to a maximum size of 16 MB compressed.

OBJECT

string

This will return a json with the data.

ARRAY

string

This will return a json with the data.

Created in 2020 by Google Inc.