ScyllaDB Batch

ScyllaDB Batch

Certified

Execute a batch of CQL mutations

Execute a bounded list of INSERT, UPDATE, or DELETE statements as a native CQL batch. Prefer small same-partition batches; batches are not a bulk-loading mechanism. COUNTER batches accept only counter mutations.

yaml
type: io.kestra.plugin.scylladb.Batch

Create a table and write a logged batch

yaml
id: scylladb_batch
namespace: company.team
tasks:
  - id: create_keyspace
    type: io.kestra.plugin.scylladb.Execute
    connection:
      contactPoints:
        - "{{ secret('SCYLLADB_CONTACT_POINT') }}"
      localDatacenter: "{{ secret('SCYLLADB_DATACENTER') }}"
      username: "{{ secret('SCYLLADB_USERNAME') }}"
      password: "{{ secret('SCYLLADB_PASSWORD') }}"
      tlsEnabled: true
    cql: >-
      CREATE KEYSPACE IF NOT EXISTS kestra
      WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': 1}
  - id: create_table
    type: io.kestra.plugin.scylladb.Execute
    connection:
      contactPoints:
        - "{{ secret('SCYLLADB_CONTACT_POINT') }}"
      localDatacenter: "{{ secret('SCYLLADB_DATACENTER') }}"
      username: "{{ secret('SCYLLADB_USERNAME') }}"
      password: "{{ secret('SCYLLADB_PASSWORD') }}"
      tlsEnabled: true
      keyspace: kestra
    cql: CREATE TABLE IF NOT EXISTS events (tenant text, id int, value text, PRIMARY KEY (tenant, id))
  - id: write_events
    type: io.kestra.plugin.scylladb.Batch
    connection:
      contactPoints:
        - "{{ secret('SCYLLADB_CONTACT_POINT') }}"
      localDatacenter: "{{ secret('SCYLLADB_DATACENTER') }}"
      username: "{{ secret('SCYLLADB_USERNAME') }}"
      password: "{{ secret('SCYLLADB_PASSWORD') }}"
      tlsEnabled: true
      keyspace: kestra
    batchType: LOGGED
    cql:
      - "INSERT INTO events (tenant, id, value) VALUES ('demo', 1, 'first')"
      - "INSERT INTO events (tenant, id, value) VALUES ('demo', 2, 'second')"
Installation

Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:

kestractl plugins get io.kestra.plugin:plugin-scylladb --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

Properties

Native CQL connection settings, including contact points, local datacenter, authentication, and optional TLS.

Definitions

Native CQL connection settings rendered at task execution.

contactPoints*array
SubTypestring

Contact points

Non-empty list of hosts, host: port, or [IPv6]: port addresses. The default port is 9042.

localDatacenter*string

Local datacenter

Datacenter used by the driver's load balancing policy, for example datacenter1.

keyspacestring

Keyspace

Optional default keyspace. Omit when creating a keyspace with DDL.

keystorePasswordstring
Formatpassword

Client keystore password

Optional client keystore password. Requires keystorePath. Use a Kestra secret expression.

keystorePathstring

Client keystore path

Optional JKS client keystore path on the worker filesystem for mutual TLS. Requires TLS.

passwordstring
Formatpassword

Password

Native CQL authentication password. Use a Kestra secret expression.

requestTimeoutstring

Request timeout

Optional strictly positive CQL request timeout as an ISO-8601 duration, for example PT30S. Otherwise the driver default applies.

tlsEnabledbooleanstring
Defaultfalse

Enable TLS

Enable certificate and hostname verification. Uses JVM trust roots unless a truststore is supplied.

truststorePasswordstring
Formatpassword

Truststore password

Optional truststore password. Requires truststorePath. Use a Kestra secret expression.

truststorePathstring

Truststore path

Optional JKS truststore path on the worker filesystem. Requires TLS.

usernamestring

Username

Native CQL authentication username. Set together with password; secret expressions are supported.

SubTypestring

CQL statements

Non-empty list of non-blank CQL mutations, with at most 65535 statements. Each entry is one statement, not a BEGIN BATCH block. Named : name markers bind the shared parameters map.

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.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset 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.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
DefaultLOGGED
Possible Values
LOGGEDUNLOGGEDCOUNTER

Batch type

LOGGED uses the batch log; UNLOGGED omits it; COUNTER is required for counter mutations. Defaults to LOGGED.

Bound parameters

Values for named : name markers in cql. Each value is rendered, then bound to a prepared statement using that marker's CQL type. Use this for flow inputs and upstream outputs instead of interpolating them into the statement text. Keys that are not markers of a statement are ignored.

Default0

Statement count

Number of statements submitted in the batch, not the number of affected rows.

Defaultfalse

Was applied

For a conditional batch, whether its conditions were satisfied. True for successful non-conditional batches.