Skip to main content
Version: 2.3.10

Cassandra

Cassandra sink connector

Description

Write data to Apache Cassandra.

Key features

Options

nametyperequireddefault value
hostStringYes-
keyspaceStringYes-
tableStringYes-
usernameStringNo-
passwordStringNo-
datacenterStringNodatacenter1
consistency_levelStringNoLOCAL_ONE
fieldsArrayNo-
batch_sizeintNo5000
batch_typeStringNoUNLOGGED
async_writebooleanNotrue

host [string]

Cassandra cluster address, the format is host:port , allowing multiple hosts to be specified. Such as "cassandra1:9042,cassandra2:9042".

keyspace [string]

The Cassandra keyspace.

table [String]

The Cassandra table name.

username [string]

Cassandra user username.

password [string]

Cassandra user password.

datacenter [String]

The Cassandra datacenter, default is datacenter1.

consistency_level [String]

The Cassandra write consistency level, default is LOCAL_ONE.

fields [array]

The data field that needs to be output to Cassandra , if not configured, it will be automatically adapted according to the sink table schema.

batch_size [number]

The number of rows written through Cassandra-Java-Driver each time, default is 5000.

batch_type [String]

The Cassandra batch processing mode, default is UNLOGGER.

async_write [boolean]

Whether cassandra writes in asynchronous mode, default is true.

Examples

sink {
Cassandra {
host = "localhost:9042"
username = "cassandra"
password = "cassandra"
datacenter = "datacenter1"
keyspace = "test"
}
}

Changelog

Change Log
ChangeCommitVersion
[improve] cassandra connector options (#8608)https://github.com/apache/seatunnel/commit/d9201108c2.3.10
[Feature][Restapi] Allow metrics information to be associated to logical plan nodes (#7786)https://github.com/apache/seatunnel/commit/6b7c53d032.3.9
[Improve] Improve some connectors prepare check error message (#7465)https://github.com/apache/seatunnel/commit/6930a25ed2.3.8
[Improve][Common] Introduce new error define rule (#5793)https://github.com/apache/seatunnel/commit/9d1b2582b2.3.4
[Improve] Remove use SeaTunnelSink::getConsumedType method and mark it as deprecated (#5755)https://github.com/apache/seatunnel/commit/8de7408102.3.4
[Feature][Connector V2] expose configurable options in Cassandra (#3681)https://github.com/apache/seatunnel/commit/73f63a5042.3.2
[Improve][build] Give the maven module a human readable name (#4114)https://github.com/apache/seatunnel/commit/d7cd601052.3.1
[Improve][Project] Code format with spotless plugin. (#4101)https://github.com/apache/seatunnel/commit/a2ab166562.3.1
[Feature][API & Connector & Doc] add parallelism and column projection interface (#3829)https://github.com/apache/seatunnel/commit/b9164b8ba2.3.1
[Improve][Connector-V2] The log outputs detailed exception stack information (#3805)https://github.com/apache/seatunnel/commit/d0c6217f22.3.1
[Improve][Connector-V2][Cassandra] Unified exception for cassandra source & sink connector (#3435)https://github.com/apache/seatunnel/commit/28868797b2.3.0
[Feature][Connector-V2][Cassandra] Add Cassandra Source And Sink Connector (#3229)https://github.com/apache/seatunnel/commit/12268a6f42.3.0