Snowflake Google Storage OAuth2 Account

In this article

Overview

You can use this account type to connect Snowflake Snaps with data sources that use Snowflake Google Storage OAuth2 account.

The Snowflake - Bulk Load and Snowflake - Bulk Upsert Snaps support loading data from Google Cloud Storage as an external stage. Input view data sources must use internal staging for Google external storage.

Prerequisites

Create a Security Integration in Snowflake to generate a client ID and a client secret. Learn more about generating a Client ID and a Client Secret in Snowflake.

Limitations and Known Issues

Account Settings

snowflake-google-storage-oauth2-account.png

 

  • Asterisk (*): Indicates a mandatory field.

  • Suggestion icon ( ): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon (): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon (): Indicates that you can add fields in the field set.

  • Remove icon (): Indicates that you can remove fields from the field set.

Field Name

Field Type

Description

Field Name

Field Type

Description

Label*

Default Value: N/A
ExampleSnowflake Google Storage OAuth2 Account

String

Specify a unique name for your account instance.

 

Client ID*

Default Value: N/A
ExampleDEF456123GHI7890

String

Specify the OAuth Client ID (to be used for token request) that you obtain from the Snowflake Console. Learn more about how to generate OAuth Client ID and Client secret.

 

Client secret

 

Default Value: N/A
Exampleabcd1234efgh5678ijkl9012mnop3456

String

Specify the OAuth Client secret that you obtain from the Snowflake Console.

 

Access token*

 

Default Value: N/A
ExampleeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiw

String

Auto-generated upon account authorization. The access token is used to make API requests on behalf of the user associated with the client ID.

 

Refresh token

 

Default Value: N/A
Example857427

String

Auto-generated upon account authorization. The token used to refresh the access token.

To access the API beyond the lifetime of a single access token, your application can obtain a refresh token. The application stores the refresh token for future use and automatically refreshes the access token before it expires.

 

Access token expiration

 

Default Value: N/A
Example16541

Integer

Auto-generated upon account authorization. The number of seconds after which the access token expires.

We recommend you to set the oauth_refresh_token_validity to 7776000 seconds when creating the Security Integration in Snowflake as this is the maximum time Snowflake allows for getting refresh tokens.

Header authenticated

 

Default Value: Deselected

Checkbox

Select this checkbox if the endpoint uses bearer header authentication.

 

OAuth2 authorization endpoint*

 

Default Value: N/A
Example: https://gm123.us-central1.gcp.snowflakecomputing.com/oauth/authentication

String

Specify the endpoint in this format https://<account_identifier>.snowflakecomputing.com/oauth/authorize to authorize the application.
Account identifier is the full name of your account that is provided by Snowflake.

OAuth2 token endpoint*

 

Default Value: N/A
Example: https://gm123.us-central1.gcp.snowflakecomputing.com/oauth/token-request

String

Specify the OAuth2 token in this format https://<account_identifier>.snowflakecomputing.com/oauth/token-request to get the access token.

Grant type

 

Default Valueauthorization_code
Exampleclient_credentials

Dropdown list

Select one of the following Grant types for authorization:

  • password: Obtains access token using your login credentials (username and password). When selected, it populates the following fields:

    • Username: Enter the username of the account type.

    • Password: Enter the password of the account type.

  • authorization_code: Authentication using credentials (username and password), which return to the client through a redirect URL. The application then receives the authorization code from the URL and uses it to request an access token.

  • client_credentials: Obtains an access token for the client ID and client secret through the token endpoint URL.

Token endpoint config

Use this field to define custom properties for the OAuth2 token endpoint. Depending on the request parameters, this endpoint returns access tokens or refresh tokens.

 

Token endpoint parameter

 

Default Value: N/A
Exampleredirect_uri

String

Specify the parameter for the token endpoint.

 

 

Token endpoint parameter value

 

Default Value: N/A
Examplehttps://elastic.snaplogic.com/api/1/snowflake/admin/oauth2callback/snowflake

Integer

Specify the value for the token endpoint parameter.

 

Auth endpoint config

Use this field set to define custom properties for the OAuth2 authentication endpoint.

Authentication parameter


Default Value: N/A
Exampleredirect_uri

String

Specify the parameter for OAuth2 authentication.

 

Authentication parameter value

Default Value: N/A
Examplehttps://elastic.snaplogic.com/api/1/snowflake/admin/oauth2callback/snowflake

String

Specify the value for the OAuth2 authentication parameter.

 

Auto-refresh token

Default valueDeselected 

Checkbox

Select this checkbox to enable auto-refresh of the access token before it expires.

 

Account Properties

JDBC JARs*

Use this field set to add a list of JDBC JAR files to be loaded. By default, the Snowflake account is bundled with the JDBC driver version 3.16.0. However, you can add a custom JAR file.

Click + to add a new row for each JDBC JAR file. Add each JAR file in a separate row. See Downloading the JDBC Driver for more information about JDBC drivers and downloading the appropriate driver for your account.

 

JDBC Driver


Default value: N/A
Examplesnowflake-jdbc-3.16.0.jar

String

Specify the fully-qualified name of the JDBC driver to be used for connecting to the server.

Hostname*

 

Default value: N/A
Exampledemo.snowflake.net

String/Expression

Specify the hostname of the Snowflake server to which you want to connect the new account.

 

Port Number*

 

Default value: 443 

Integer/Expression

Specify the port number associated with the Snowflake database server that you want to use for this account.

 

Database name*

 

Default Value: N/A
Exampletestdb

String/Expression

Specify the Snowflake database to connect.

 

Warehouse name*

 

Default value: N/A
Examplesnapwarehouse

String/Expression

Specify the name of the warehouse to which you want to connect.

 

JDBC Driver Class

 

Default Valuenet.snowflake.client.jdbc.SnowflakeDriver
Examplenet.snowflake.client.jdbc.SnowflakeDriver

String

Specify the JDBC driver class to use.

 

GCS Bucket

 

Default Value: N/A
Examplegcsoauthstorage

String/Expression

Specify the name of the GCS Bucket you want to use for the account instance.

 

GCS Folder

 

Default Value: N/A
Examplegcs_storageint

String/Expression

Specify the GCS folder to connect to the instance of the GCS storage OAuth2 account.

 

Storage Integration

 

Default value: N/A
ExampleGCS SI

String/Expression

Specify the name of the storage integration.

 

Advanced properties

URL Properties

Use this field set to configure the URLs associated with this account.

URL property name

Default value: [None]
ExamplequeryTimeout

String

Specify the name of the URL property.

 

URL property value

Default value: [None]
Example0

String

Specify the URL property value associated with the URL property name.

 

Batch size*

 

Default Value: 50
Example: 50

Integer/Expression

Specify the number of statements that you want to execute at a time.

Fetch size*

 

Default Value: 100
Example: 50

Integer/Expression

Specify the number of rows you want a query to fetch during each execution.

Min pool size*

 

Default Value3
Example: 2

Integer/Expression

Specify the minimum number of idle connections that you want the pool to maintain at a time. 

Minimum value: 0
Maximum value: No limit

Max pool size*

 

Default Value50
Example: 40

Integer/Expression

Specify the maximum number of connections that you want the pool to maintain at a time.

Minimum value: 0
Maximum value: No limit

Max life time*

 

Default Value60
Example50

Integer/Expression

Specify the maximum lifetime of a connection in the pool.

Idle Timeout*

 

Default Value5
Example: 4

Integer/Expression