
Snowflake Put
CertifiedRun a native Snowflake PUT command on an internal storage file
Snowflake Put
Run a native Snowflake PUT command on an internal storage file
Executes the native Snowflake PUT command on a file from Kestra internal storage. Use this task when native PUT options are required; use Upload for simpler file uploads to a Snowflake stage.
type: io.kestra.plugin.jdbc.snowflake.PutExamples
id: snowflake_put
namespace: company.team
tasks:
- id: put
type: io.kestra.plugin.jdbc.snowflake.Put
url: jdbc:snowflake://<account_identifier>.snowflakecomputing.com
username: "{{ secret('SNOWFLAKE_USERNAME') }}"
password: "{{ secret('SNOWFLAKE_PASSWORD') }}"
from: '{{ outputs.extract.uri }}'
stageName: "@demo_db.public.%myStage"
Properties
from *string
Path to the file to upload to Snowflake
stageName *string
Snowflake internal stage name
Name of the Snowflake internal stage. The @ prefix is added automatically if omitted. External stages are not supported.
url *string
The JDBC URL to connect to the database
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150autoCompress booleanstring
Whether to automatically compress the file
database string
Specifies the default database to use once connected
The specified database should be an existing database for which the specified default role has privileges.
If you need to use a different database after connecting, execute the USE DATABASE command.
fileName string
Name of the file in the stage
Defaults to the file name of the from URI.
overwrite booleanstring
Whether to overwrite existing files
parallel integerstring
Parallelism
Number of threads used for uploading. Must be between 1 and 99.
password string
The database user's password
privateKey string
Private key used for Snowflake key-pair authentication
Kestra supports multiple private key formats for Snowflake key-pair authentication.
You can provide your key in any of the following formats:
PKCS8 DER (base64-encoded, single-line)
PEM PKCS8: -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY-----
PEM PKCS1 RSA: -----BEGIN RSA PRIVATE KEY----- ... -----END RSA PRIVATE KEY-----
Multiline or single-line input (Kestra will normalize automatically)
Encrypted PKCS8 (requires providing
privateKeyPassword)
Recommended format
Snowflake recommends PKCS8. If your key is in PKCS1 format, Kestra will automatically convert it.
Example: using a PEM PKCS8 key (recommended)
secret('SNOWFLAKE_PRIVATE_KEY') should contain:
-----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASC... ... -----END PRIVATE KEY-----
Example: encrypted private key
privateKey: "{{ secret('SNOWFLAKE_PRIVATE_KEY') }}" privateKeyPassword: "{{ secret('SNOWFLAKE_PRIVATE_KEY_PASSWORD') }}"
Converting a PEM key to unencrypted PKCS8 DER (optional)
openssl pkcs8 -topk8 -nocrypt -inform PEM -outform DER
-in private_key.pem
-out private_key.der
base64 -w 0 private_key.der > private_key.base64
You can then store the content of private_key.base64 as the Kestra secret.
Kestra automatically detects the format and performs the necessary conversions. No manual header stripping or reformatting is required.
privateKeyPassword string
Specifies the private key password for key pair authentication and key rotation
queryTag string
Query tag for Snowflake session tracking
Optional string to tag queries executed within the session for monitoring and cost allocation
role string
Specifies the default access control role to use in the Snowflake session initiated by the driver
The specified role should be an existing role that has already been assigned to the specified user for the driver. If the specified role has not already been assigned to the user, the role is not used when the session is initiated by the driver.
If you need to use a different role after connecting, execute the USE ROLE command.
schema string
Specifies the default schema to use for the specified database once connected
The specified schema should be an existing schema for which the specified default role has privileges.
If you need to use a different schema after connecting, execute the USE SCHEMA command.
sourceCompression string
AUTO_DETECTGZIPBZ2BROTLIZSTDDEFLATERAW_DEFLATENONESource file compression type
username string
The database user
warehouse string
Specifies the virtual warehouse to use once connected
The specified warehouse should be an existing warehouse for which the specified default role has privileges.
If you need to use a different warehouse after connecting, execute the USE WAREHOUSE command to set a different warehouse for the session.
Outputs
rows array
Snowflake PUT result