Upload
type: "io.kestra.plugin.jdbc.snowflake.Upload"
Upload data from an internal storage file to Snowflake stage. Make sure that the stageName
follows the naming convention of @databaseName.schemaName.%stageOrTableName
. For usage examples, check the Blueprints tagged with Snowflake
.
Examples
id: snowflake_upload
namespace: company.team
tasks:
- id: upload
type: io.kestra.plugin.jdbc.snowflake.Upload
url: jdbc:snowflake://<account_identifier>.snowflakecomputing.com
username: snowflake_user
password: snowflake_password
from: '{{ outputs.extract.uri }}'
fileName: data.csv
prefix: raw
stageName: "@demo_db.public.%myStage"
Properties
compress
- Type: boolean
- Dynamic: ❌
- Required: ✔️
- Default:
true
Whether to compress the file or not before uploading it to the Snowflake stage.
fileName
- Type: string
- Dynamic: ✔️
- Required: ✔️
Destination file name to use.
from
- Type: string
- Dynamic: ✔️
- Required: ✔️
Path to the file to load to Snowflake stage.
prefix
- Type: string
- Dynamic: ✔️
- Required: ✔️
The prefix under which the file will be uploaded to Snowflake stage.
stageName
- Type: string
- Dynamic: ✔️
- Required: ✔️
Snowflake stage name.
This can either be a stage name or a table name.
url
- Type: string
- Dynamic: ✔️
- Required: ✔️
The JDBC URL to connect to the database.
database
- Type: string
- Dynamic: ✔️
- Required: ❌
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.
password
- Type: string
- Dynamic: ✔️
- Required: ❌
The database user's password.
privateKey
- Type: string
- Dynamic: ✔️
- Required: ❌
Specifies the private key for key pair authentication and key rotation.
It needs to be an un-encoded private key in plaintext.
privateKeyFile
- Type: string
- Dynamic: ✔️
- Required: ❌
Specifies the private key file for key pair authentication and key rotation.
It needs to be the path on the host where the private key file is located.
privateKeyFilePassword
- Type: string
- Dynamic: ✔️
- Required: ❌
Specifies the private key file password for key pair authentication and key rotation.
role
- Type: string
- Dynamic: ✔️
- Required: ❌
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
- Type: string
- Dynamic: ✔️
- Required: ❌
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.
username
- Type: string
- Dynamic: ✔️
- Required: ❌
The database user.
warehouse
- Type: string
- Dynamic: ✔️
- Required: ❌
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
uri
- Type: string
- Required: ❌
- Format:
uri
The URI of the staged file.
Was this page helpful?