You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/10/29 14:42:04 UTC

[GitHub] [incubator-seatunnel] EricJoy2048 commented on a diff in pull request #3229: [Feature][Connector-V2][Cassandra] Add Cassandra Source And Sink Connector

EricJoy2048 commented on code in PR #3229:
URL: https://github.com/apache/incubator-seatunnel/pull/3229#discussion_r1008710703


##########
docs/en/connector-v2/source/Cassandra.md:
##########
@@ -0,0 +1,76 @@
+# Cassandra
+
+> Cassandra source connector
+
+## Description
+
+Read data from Apache Cassandra.
+
+## Key features
+
+- [x] [batch](../../concept/connector-v2-features.md)
+- [ ] [stream](../../concept/connector-v2-features.md)
+- [ ] [exactly-once](../../concept/connector-v2-features.md)
+- [x] [schema projection](../../concept/connector-v2-features.md)
+- [ ] [parallelism](../../concept/connector-v2-features.md)
+- [ ] [support user-defined split](../../concept/connector-v2-features.md)
+
+## Options
+
+| name                    | type   | required | default value |
+|-------------------------|--------|----------|---------------|
+| host                    | String | Yes      | -             |
+| keyspace                | String | Yes      | -             |
+| cql                     | String | Yes      | -             |
+| username                | String | No       | -             |
+| password                | String | No       | -             |
+| datacenter              | String | No       | datacenter1   |
+| consistency_level       | String | No       | LOCAL_ONE     |
+
+### 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.
+
+### cql [String]
+
+The query cql used to search data though Cassandra session.
+
+### 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`.
+
+## Examples
+
+```hocon
+source {
+ Cassandra {
+     host = "localhost:9042"
+     username = "cassandra"
+     password = "cassandra"
+     datacenter = "datacenter1"
+     keyspace = "test"
+     cql = "select * from source_table"
+     result_table_name = "source_table"
+    }
+}
+```
+
+

Review Comment:
   same as above.



##########
docs/en/connector-v2/sink/Cassandra.md:
##########
@@ -0,0 +1,93 @@
+# Cassandra
+
+> Cassandra sink connector
+
+## Description
+
+Write data to Apache Cassandra.
+
+## Key features
+
+- [x] [batch](../../concept/connector-v2-features.md)
+- [ ] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [schema projection](../../concept/connector-v2-features.md)
+
+## Options
+
+| name              | type   | required | default value |
+|-------------------|--------|----------|---------------|
+| host              | String | Yes      | -             |
+| keyspace          | String | Yes      | -             |
+| table             | String | Yes      | -             |
+| username          | String | No       | -             |
+| password          | String | No       | -             |
+| datacenter        | String | No       | datacenter1   |
+| consistency_level | String | No       | LOCAL_ONE     |
+| fields            | String | No       | LOCAL_ONE     |
+| batch_size        | String | No       | 5000          |
+| batch_type        | String | No       | UNLOGGER      |
+| async_write       | String | No       | true          |
+
+### 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](https://github.com/datastax/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
+
+```hocon
+sink {
+ Cassandra {
+     host = "localhost:9042"
+     username = "cassandra"
+     password = "cassandra"
+     datacenter = "datacenter1"
+     keyspace = "test"
+    }
+}
+```
+
+
+

Review Comment:
   Please add `changed logs` reference https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/connector-v2/source/SftpFile.md



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org