PipelinewiseSnowflake PipelinewiseSnowflake

yaml
type: "io.kestra.plugin.singer.targets.PipelinewiseSnowflake"

A Singer target loads data into a Snowflake database.

Full documentation can be found here

Properties

account

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Min length: 1

Snowflake account name (i.e. rtXXXXX.eu-central-1)

database

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Min length: 1

The database name

from

  • Type: string
  • Dynamic:
  • Required: ✔️

The raw data from a tap

stateName

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Default: singer-state

The name of singer state file

username

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Min length: 1

The database user

warehouse

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Min length: 1

Snowflake virtual warehouse name

addMetadataColumns

  • Type: boolean
  • Dynamic:
  • Required:
  • Default: false

Metadata columns add extra row level information about data ingestions, (i.e. when was the row read in source, when was inserted or deleted in snowflake etc.) Metadata columns are creating automatically by adding extra columns to the tables with a column prefix _SDC_. The column names are following the stitch naming conventions documented at https://www.stitchdata.com/docs/data-structure/integration-schemas#sdc-columns. Enabling metadata columns will flag the deleted rows by setting the _SDC_DELETED_AT metadata column. Without the add_metadata_columns option the deleted rows from singer taps will not be recongisable in Snowflake.

archiveLoadFiles

  • Type: boolean
  • Dynamic:
  • Required:
  • Default: false

When enabled, the files loaded to Snowflake will also be stored in archive_load_files_s3_bucket under the key /{archive_load_files_s3_prefix}/{schema_name}/{table_name}/. All archived files will have tap, schema, table and archived-by as S3 metadata keys. When incremental replication is used, the archived files will also have the following S3 metadata keys: incremental-key, incremental-key-min and incremental-key-max

archiveLoadFilesS3Bucket

  • Type: string
  • Dynamic: ✔️
  • Required:

(Default: Value of s3_bucket) When archive_load_files is enabled, the archived files will be placed in this bucket

archiveLoadFilesS3Prefix

  • Type: string
  • Dynamic: ✔️
  • Required:

(Default: archive) When archive_load_files is enabled, the archived files will be placed in the archive S3 bucket under this prefix

awsAccessKeyId

  • Type: string
  • Dynamic: ✔️
  • Required:

S3 Access Key Id. If not provided, AWS_ACCESS_KEY_ID environment variable or IAM role will be used

awsProfile

  • Type: string
  • Dynamic: ✔️
  • Required:

AWS profile name for profile based authentication. If not provided, AWS_PROFILE environment variable will be used.

awsSecretAccessKey

  • Type: string
  • Dynamic: ✔️
  • Required:

S3 Secret Access Key. If not provided, AWS_SECRET_ACCESS_KEY environment variable or IAM role will be used

awsSessionToken

  • Type: string
  • Dynamic: ✔️
  • Required:

AWS Session token. If not provided, AWS_SESSION_TOKEN environment variable will be used

batchSizeRows

  • Type: integer
  • Dynamic:
  • Required:
  • Default: 100000

Maximum number of rows in each batch. At the end of each batch, the rows in the batch are loaded into Snowflake.

batchWaitLimit

  • Type: string
  • Dynamic:
  • Required:
  • Format: duration

Maximum time to wait for batch to reach batch_size_rows.

clientSideEncryptionMasterKey

  • Type: string
  • Dynamic: ✔️
  • Required:

When this is defined, Client-Side Encryption is enabled. The data in S3 will be encrypted, No third parties, including Amazon AWS and any ISPs, can see data in the clear. Snowflake COPY command will decrypt the data once it's in Snowflake. The master key must be 256-bit length and must be encoded as base64 string.

command

  • Type: string
  • Dynamic: ✔️
  • Required:

Override default singer command

dataFlatteningMaxLevel

  • Type: integer
  • Dynamic:
  • Required:
  • Default: 0

(Default: 0) Object type RECORD items from taps can be loaded into VARIANT columns as JSON (default) or we can flatten the schema by creating columns automatically.

When value is 0 (default) then flattening functionality is turned off.

defaultTargetSchema

  • Type: string
  • Dynamic: ✔️
  • Required:

Name of the schema where the tables will be created, without database prefix. If schema_mapping is not defined then every stream sent by the tap is loaded into this schema.

defaultTargetSchemaSelectPermission

  • Type: string
  • Dynamic: ✔️
  • Required:

Grant USAGE privilege on newly created schemas and grant SELECT privilege on newly created tables to a specific role or a list of roles. If schema_mapping is not defined then every stream sent by the tap is granted accordingly.

disableTableCache

  • Type: boolean
  • Dynamic: ✔️
  • Required:
  • Default: false

By default the connector caches the available table structures in Snowflake at startup. In this way it doesn't need to run additional queries when ingesting data to check if altering the target tables is required. With disable_table_cache option you can turn off this caching. You will always see the most recent table structures but will cause an extra query runtime.

docker

Docker options when for the DOCKER runner

fileFormat

  • Type: string
  • Dynamic: ✔️
  • Required:

Named file format name created at pre-requirements section. Has to be a fully qualified name including the schema name.

flushAllStreams

  • Type: boolean
  • Dynamic: ✔️
  • Required:
  • Default: false

Flush and load every stream into Snowflake when one batch is full. Warning: This may trigger the COPY command to use files with low number of records, and may cause performance problems.

hardDelete

  • Type: boolean
  • Dynamic:
  • Required:
  • Default: false

When hardDelete option is true then DELETE SQL commands will be performed in Snowflake to delete rows in tables. It's achieved by continuously checking the _SDC_DELETED_AT metadata column sent by the singer tap. Due to deleting rows requires metadata columns, hard_delete option automatically enables the add_metadata_columns option as well.

noCompression

  • Type: boolean
  • Dynamic:
  • Required:
  • Default: false

Generate uncompressed files when loading to Snowflake. Normally, by default GZIP compressed files are generated.

parallelism

  • Type: integer
  • Dynamic:
  • Required:
  • Default: 0

The number of threads used to flush tables. 0 will create a thread for each stream, up to parallelism_max. -1 will create a thread for each CPU core. Any other positive number will create that number of threads, up to parallelism_max.

parallelismMax

  • Type: integer
  • Dynamic:
  • Required:
  • Default: 16

Max number of parallel threads to use when flushing tables.

password

  • Type: string
  • Dynamic: ✔️
  • Required:

The database user's password

pipPackages

  • Type: array
  • SubType: string
  • Dynamic: ✔️
  • Required:

Override default pip packages to use a specific version

primaryKeyRequired

  • Type: boolean
  • Dynamic:
  • Required:
  • Default: true

Log based and Incremental replications on tables with no Primary Key cause duplicates when merging UPDATE events. When set to true, stop loading data if no Primary Key is defined.

queryTag

  • Type: string
  • Dynamic: ✔️
  • Required:

Optional string to tag executed queries in Snowflake. Replaces tokens null, null and null with the appropriate values. The tags are displayed in the output of the Snowflake QUERY_HISTORY, QUERY_HISTORY_BY_* functions.

role

  • Type: string
  • Dynamic: ✔️
  • Required:

Snowflake role to use. If not defined then the user's default role will be used

s3Acl

  • Type: string
  • Dynamic: ✔️
  • Required:

S3 ACL name to set on the uploaded files

s3Bucket

  • Type: string
  • Dynamic: ✔️
  • Required:

S3 Bucket name. Required if to use S3 External stage. When this is defined then stage has to be defined as well.

s3EndpointUrl

  • Type: string
  • Dynamic: ✔️
  • Required:

The complete URL to use for the constructed client. This is allowing to use non-native s3 account.

s3KeyPrefix

  • Type: string
  • Dynamic: ✔️
  • Required:

A static prefix before the generated S3 key names. Using prefixes you can upload files into specific directories in the S3 bucket.

s3RegionName

  • Type: string
  • Dynamic: ✔️
  • Required:

Default region when creating new connections

schemaMapping

  • Type: string
  • Dynamic: ✔️
  • Required:

Useful if you want to load multiple streams from one tap to multiple Snowflake schemas.

If the tap sends the stream_id in <schema_name>-<table_name> format then this option overwrites the default_target_schema value. Note, that using schema_mapping you can overwrite the default_target_schema_select_permission value to grant SELECT permissions to different groups per schemas or optionally you can create indices automatically for the replicated tables.

Note: This is an experimental feature and recommended to use via PipelineWise YAML files that will generate the object mapping in the right JSON format. For further info check a PipelineWise YAML Example

stage

  • Type: string
  • Dynamic: ✔️
  • Required:

Named external stage name created at pre-requirements section. Has to be a fully qualified name including the schema name. If not specified, table internal stage are used. When this is defined then s3_bucket has to be defined as well.

validateRecords

  • Type: boolean
  • Dynamic: ✔️
  • Required:
  • Default: false

Validate every single record message to the corresponding JSON schema. This option is disabled by default and invalid RECORD messages will fail only at load time by Snowflake. Enabling this option will detect invalid records earlier but could cause performance degradation.

Outputs

state

  • Type: string
  • Dynamic:
  • Required:
  • Format: uri

Uri of the state file

Definitions

io.kestra.plugin.scripts.exec.scripts.models.DockerOptions-DeviceRequest

Properties

capabilities
  • Type: array
  • SubType: array
  • Dynamic:
  • Required:

A list of capabilities; an OR list of AND lists of capabilities.

count
  • Type: integer
  • Dynamic:
  • Required:
deviceIds
  • Type: array
  • SubType: string
  • Dynamic: ✔️
  • Required:
driver
  • Type: string
  • Dynamic: ✔️
  • Required:
options
  • Type: object
  • SubType: string
  • Dynamic:
  • Required:

Driver-specific options, specified as key/value pairs. These options are passed directly to the driver.

io.kestra.plugin.scripts.exec.scripts.models.DockerOptions-Credentials

Properties

auth
  • Type: string
  • Dynamic: ✔️
  • Required:

The registry authentication. The auth field is a base64-encoded authentication string of username:password or a token.

identityToken
  • Type: string
  • Dynamic: ✔️
  • Required:

The identity token.

password
  • Type: string
  • Dynamic: ✔️
  • Required:

The registry password.

registry
  • Type: string
  • Dynamic: ✔️
  • Required:

The registry URL. If not defined, the registry will be extracted from the image name.

registryToken
  • Type: string
  • Dynamic: ✔️
  • Required:

The registry token.

username
  • Type: string
  • Dynamic: ✔️
  • Required:

The registry username.

io.kestra.plugin.scripts.exec.scripts.models.DockerOptions-Memory

Properties

kernelMemory
  • Type: string
  • Dynamic: ✔️
  • Required:

The maximum amount of kernel memory the container can use. The minimum allowed value is 4m. Because kernel memory cannot be swapped out, a container which is starved of kernel memory may block host machine resources, which can have side effects on the host machine and on other containers. See --kernel-memory details.

memory
  • Type: string
  • Dynamic: ✔️
  • Required:

The maximum amount of memory resources the container can use. It is recommended that you set the value to at least 6 megabytes.

memoryReservation
  • Type: string
  • Dynamic: ✔️
  • Required:

Allows you to specify a soft limit smaller than memory which is activated when Docker detects contention or low memory on the host machine. If you use memoryReservation, it must be set lower than memory for it to take precedence. Because it is a soft limit, it does not guarantee that the container doesn’t exceed the limit.

memorySwap
  • Type: string
  • Dynamic: ✔️
  • Required:

The amount of memory this container is allowed to swap to disk. If memory and memorySwap are set to the same value, this prevents containers from using any swap. This is because memorySwap is the amount of combined memory and swap that can be used, while memory is only the amount of physical memory that can be used.

memorySwappiness
  • Type: string
  • Dynamic: ✔️
  • Required:

The amount of memory this container is allowed to swap to disk. By default, the host kernel can swap out a percentage of anonymous pages used by a container. You can set memorySwappiness to a value between 0 and 100, to tune this percentage.

oomKillDisable
  • Type: boolean
  • Dynamic:
  • Required:

By default, if an out-of-memory (OOM) error occurs, the kernel kills processes in a container. To change this behavior, use the oomKillDisable option. Only disable the OOM killer on containers where you have also set the memory option. If the memory flag is not set, the host can run out of memory, and the kernel may need to kill the host system’s processes to free the memory.

io.kestra.plugin.scripts.exec.scripts.models.DockerOptions

Properties

image
  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Min length: 1

Docker image to use.

config
  • Type:
    • string
    • object
  • Dynamic: ✔️
  • Required:

Docker configuration file. Docker configuration file that can set access credentials to private container registries. Usually located in ~/.docker/config.json.

cpu

Limits the CPU usage to a given maximum threshold value. By default, each container’s access to the host machine’s CPU cycles is unlimited. You can set various constraints to limit a given container’s access to the host machine’s CPU cycles.

credentials

Credentials for a private container registry.

deviceRequests

A list of device requests to be sent to device drivers.

entryPoint
  • Type: array
  • SubType: string
  • Dynamic: ✔️
  • Required:

Docker entrypoint to use.

extraHosts
  • Type: array
  • SubType: string
  • Dynamic: ✔️
  • Required:

Extra hostname mappings to the container network interface configuration.

host
  • Type: string
  • Dynamic: ✔️
  • Required:

Docker API URI.

memory

Limits memory usage to a given maximum threshold value. Docker can enforce hard memory limits, which allow the container to use no more than a given amount of user or system memory, or soft limits, which allow the container to use as much memory as it needs unless certain conditions are met, such as when the kernel detects low memory or contention on the host machine. Some of these options have different effects when used alone or when more than one option is set.

networkMode
  • Type: string
  • Dynamic: ✔️
  • Required:

Docker network mode to use e.g. host, none, etc.

pullPolicy
  • Type: object
  • Dynamic:
  • Required:
shmSize
  • Type: string
  • Dynamic: ✔️
  • Required:

Size of /dev/shm in bytes. The size must be greater than 0. If omitted, the system uses 64MB.

user
  • Type: string
  • Dynamic: ✔️
  • Required:

User in the Docker container.

volumes
  • Type: array
  • SubType: string
  • Dynamic: ✔️
  • Required:

List of volumes to mount. Must be a valid mount expression as string, example : /home/user:/app.

Volumes mount are disabled by default for security reasons; you must enable them on server configuration by setting kestra.tasks.scripts.docker.volume-enabled to true.

io.kestra.plugin.scripts.exec.scripts.models.DockerOptions-Cpu

Properties

cpus
  • Type: integer
  • Dynamic:
  • Required:

The maximum amount of CPU resources a container can use. For instance, if the host machine has two CPUs and you set cpus:"1.5", the container is guaranteed at most one and a half of the CPUs.