Cassandra
Cassandra 接收器连接器
描述
将数据写入 Apache Cassandra.
关键特性
选项
| 名称 | 类型 | 必需 | 默认值 | 
|---|---|---|---|
| host | String | 是 | - | 
| keyspace | String | 是 | - | 
| table | String | 是 | - | 
| username | String | 否 | - | 
| password | String | 否 | - | 
| datacenter | String | 否 | datacenter1 | 
| consistency_level | String | 否 | LOCAL_ONE | 
| fields | Array | 否 | - | 
| batch_size | int | 否 | 5000 | 
| batch_type | String | 否 | UNLOGGED | 
| async_write | boolean | 否 | true | 
host [string]
Cassandra 的集群地址,格式为 host:port , 允许指定多个 hosts . 例如
"cassandra1:9042,cassandra2:9042".
keyspace [string]
Cassandra 键空间.
table [String]
Cassandra 的表名.
username [string]
Cassandra 用户的用户名.
password [string]
Cassandra 用户的密码.
datacenter [String]
Cassandra 的数据中心, 默认为 datacenter1.
consistency_level [String]
Cassandra 写入一致性级别, 默认为 LOCAL_ONE.
fields [array]
需要输出到 Cassandra 的数据字段, 如果未配置, 如果未配置,它将自动适应 sink 表 schema.
batch_size [number]
通过 Cassandra-Java-Driver 每次写入的行数,
默认值 5000.
batch_type [String]
Cassandra 批处理模式, 默认值 UNLOGGER.
async_write [boolean]
cassandra 是否以异步模式写入, 默认值 true.
示例
sink {
 Cassandra {
     host = "localhost:9042"
     username = "cassandra"
     password = "cassandra"
     datacenter = "datacenter1"
     keyspace = "test"
    }
}
变更日志
Change Log
| Change | Commit | Version | 
|---|---|---|
| [improve] cassandra connector options (#8608) | https://github.com/apache/seatunnel/commit/d9201108c | 2.3.10 | 
| [Feature][Restapi] Allow metrics information to be associated to logical plan nodes (#7786) | https://github.com/apache/seatunnel/commit/6b7c53d03 | 2.3.9 | 
| [Improve] Improve some connectors prepare check error message (#7465) | https://github.com/apache/seatunnel/commit/6930a25ed | 2.3.8 | 
| [Improve][Common] Introduce new error define rule (#5793) | https://github.com/apache/seatunnel/commit/9d1b2582b | 2.3.4 | 
[Improve] Remove use SeaTunnelSink::getConsumedType method and mark it as deprecated (#5755) | https://github.com/apache/seatunnel/commit/8de740810 | 2.3.4 | 
| [Feature][Connector V2] expose configurable options in Cassandra (#3681) | https://github.com/apache/seatunnel/commit/73f63a504 | 2.3.2 | 
| [Improve][build] Give the maven module a human readable name (#4114) | https://github.com/apache/seatunnel/commit/d7cd60105 | 2.3.1 | 
| [Improve][Project] Code format with spotless plugin. (#4101) | https://github.com/apache/seatunnel/commit/a2ab16656 | 2.3.1 | 
| [Feature][API & Connector & Doc] add parallelism and column projection interface (#3829) | https://github.com/apache/seatunnel/commit/b9164b8ba | 2.3.1 | 
| [Improve][Connector-V2] The log outputs detailed exception stack information (#3805) | https://github.com/apache/seatunnel/commit/d0c6217f2 | 2.3.1 | 
| [Improve][Connector-V2][Cassandra] Unified exception for cassandra source & sink connector (#3435) | https://github.com/apache/seatunnel/commit/28868797b | 2.3.0 | 
| [Feature][Connector-V2][Cassandra] Add Cassandra Source And Sink Connector (#3229) | https://github.com/apache/seatunnel/commit/12268a6f4 | 2.3.0 |