Configuration for Snowpipe Streaming Classic¶
Snowpipe Streaming properties (Classic architecture)¶
Configure the API connection settings in a profile.json file. The properties are described in this topic.
As shown in the Java example (GitHub), you can load the settings from profile.json by specifying the file path as the input to the variable PROFILE_PATH.
Required properties¶
authorization_typeConfigure the authentication and authorization method for the user. You can use one of the following methods:
JWT: key pair authentication with JSON Web Token (JWT). This is the default method. Ifauthorization_typeis not configured, the default methodJWTis used. Configure the followingprivate_keyfor key pair authentication:private_keyPrivate key to authenticate the user. Include only the key, not the header or footer. If the key is split across multiple lines, remove the line breaks.You can provide an unencrypted key, or you can provide an encrypted key and provide the
snowflake.private.key.passphraseparameter to enable Snowflake to decrypt the key. Use this parameter if and only if thesnowflake.private.keyparameter value is encrypted.
OAuth: Snowflake OAuth. This option is only available with Snowflake Ingest SDK versions 2.0.3 and later. Configure the following parameters for Snowflake OAuth in theprofile.jsonfile:oauth_client_id: The client ID of the OAuth integration.oauth_client_secret: The client secret of the OAuth integration.oauth_refresh_token: A valid refresh token of the OAuth integration.
To support token refresh on Snowflake/OKTA OAuth, you must configure three parameters:
oauth_client_id,oauth_client_secret, andoauth_refresh_token. However, if you use a customized API endpoint for OAuth that doesn’t require these values in the token refresh request, you can fill in the fields for these parameters with any placeholders.
urlURL for accessing your Snowflake account. This URL must include your account identifier. The protocol (
https://) and port number are optional.urlis not required if you are already using the Snowflake Ingest SDK and have set thehost,scheme, andportproperties in theprofile.jsonfile.userUser login name for the Snowflake account.
Optional properties¶
enable_iceberg_streamingSet the property to
trueto enable Snowpipe Streaming with the Snowflake-managed Apache Iceberg™ table. For more information, see Using Snowpipe Streaming Classic with Apache Iceberg™ tables.max_client_lagUse this property to configure the data flush latency. By default, Snowpipe Streaming flushes data every 1 second for standard Snowflake tables (non-Apache Iceberg). The max_client_lag configuration lets you override that and set it to your desired flush latency from 1 second to 10 minutes. For more information, see Snowpipe Streaming latency recommendations.
snowflake.private.key.passphrasePassphrase to decrypt the private key when the key is encrypted. For information, see Using key pair authentication and key rotation (in this topic).
roleAccess control role to use for the session after connecting to Snowflake.
The
roleproperty is optional for Snowflake Ingest SDK versions 2.0.3 and later. It is required for earlier Ingest SDK versions.
Examples¶
For a simple example that shows how the client SDK could be used to build a Snowpipe Streaming application, see this Java file (GitHub).
Quick start examples: