Carl-Zhou-CN commented on code in PR #4903:
URL: https://github.com/apache/seatunnel/pull/4903#discussion_r1222664570
##########
docs/en/connector-v2/sink/Doris.md:
##########
@@ -17,67 +30,96 @@ Version Supported
:::
-## Key features
-
-- [x] [exactly-once](../../concept/connector-v2-features.md)
-- [x] [cdc](../../concept/connector-v2-features.md)
-
-## Options
-
-| name | type | required | default value |
-|--------------------|--------|----------|---------------|
-| fenodes | string | yes | - |
-| username | string | yes | - |
-| password | string | yes | - |
-| table.identifier | string | yes | - |
-| sink.label-prefix | string | yes | - |
-| sink.enable-2pc | bool | no | true |
-| sink.enable-delete | bool | no | false |
-| doris.config | map | yes | - |
-
-### fenodes [string]
-
-`Doris` cluster fenodes address, the format is `"fe_ip:fe_http_port, ..."`
-
-### username [string]
-
-`Doris` user username
+## Sink Options
+
+| Name | Type | Required | Default | Description
|
+|---------------------|--------|----------|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| fenodes | String | Yes | - | `Doris` cluster
fenodes address, the format is `"fe_ip:fe_http_port, ..."`
|
+| username | String | Yes | - | `Doris` user username
|
+| password | String | Yes | - | `Doris` user password
|
+| table.identifier | String | Yes | - | The name of `Doris`
table
|
+| sink.label-prefix | String | Yes | - | The label prefix used
by stream load imports. In the 2pc scenario, global uniqueness is required to
ensure the EOS semantics of SeaTunnel.
|
+| sink.enable-2pc | bool | No | - | Whether to enable
two-phase commit (2pc), the default is true, to ensure Exactly-Once semantics.
For two-phase commit, please refer to
[here](https://doris.apache.org/docs/dev/sql-manual/sql-reference/Data-Manipulation-Statements/Load/STREAM-LOAD).
|
+| sink.enable-delete | bool | No | - | Whether to enable
deletion. This option requires Doris table to enable batch delete function
(0.15+ version is enabled by default), and only supports Unique model. you can
get more detail at this
[link](https://doris.apache.org/docs/dev/data-operate/update-delete/batch-delete-manual)
|
+| sink.check-interval | int | No | 10000 | check exception with
the interval while loading
|
+| sink.max-retries | int | No | 3 | the max retry times
if writing records to database failed
|
+| sink.buffer-size | int | No | 256 * 1024 | the buffer size to
cache data for stream load.
|
+| sink.buffer-count | int | No | 3 | the buffer count to
cache data for stream load.
|
+| doris.config | map | yes | - | This option is used
to support operations such as `insert`, `delete`, and `update` when
automatically generate sql,and supported formats.
|
-### password [string]
-
-`Doris` user password
-
-### table.identifier [string]
-
-The name of `Doris` table
-
-### sink.label-prefix [string]
-
-The label prefix used by stream load imports. In the 2pc scenario, global
uniqueness is required to ensure the EOS semantics of SeaTunnel.
-
-### sink.enable-2pc [bool]
-
-Whether to enable two-phase commit (2pc), the default is true, to ensure
Exactly-Once semantics. For two-phase commit, please refer to
[here](https://doris.apache.org/docs/dev/sql-manual/sql-reference/Data-Manipulation-Statements/Load/STREAM-LOAD).
-
-### sink.enable-delete [bool]
+#### Supported import data formats
-Whether to enable deletion. This option requires Doris table to enable batch
delete function (0.15+ version is enabled by default), and only supports Unique
model. you can get more detail at this link:
+The supported formats include CSV and JSON
-https://doris.apache.org/docs/dev/data-operate/update-delete/batch-delete-manual
+## Task Example
-### doris.config [map]
+### Simple:
-The parameter of the stream load `data_desc`, you can get more detail at this
link:
+> This example defines a SeaTunnel synchronization task that automatically
generates data through FakeSource and sends it to Doris Sink,FakeSource
simulates CDC data with schema pk_id (bigint type), name (string type), and
score (int type),Doris needs to create a table sink named test.e2e_table_sink
and a corresponding table for it.
-https://doris.apache.org/docs/dev/sql-manual/sql-reference/Data-Manipulation-Statements/Load/STREAM-LOAD
+```hocon
+env {
+ execution.parallelism = 1
+ job.mode = "BATCH"
+}
-#### Supported import data formats
+source {
+ FakeSource {
+ schema = {
+ fields {
+ pk_id = bigint
+ name = string
+ score = int
+ }
+ }
+ rows = [
+ {
+ kind = INSERT
+ fields = [1, "A", 100]
+ },
+ {
+ kind = INSERT
+ fields = [2, "B", 100]
+ },
+ {
+ kind = INSERT
+ fields = [3, "C", 100]
+ },
+ {
+ kind = UPDATE_BEFORE
+ fields = [1, "A", 100]
+ },
+ {
+ kind = UPDATE_AFTER
+ fields = [1, "A_1", 100]
+ },
+ {
+ kind = DELETE
+ fields = [2, "B", 100]
+ }
+ ]
+ }
+}
-The supported formats include CSV and JSON. Default value: CSV
+sink {
+ Doris {
+ fenodes = "doris_cdc_e2e:8030"
+ username = root
+ password = ""
+ table.identifier = "test.e2e_table_sink"
+ sink.label-prefix = "test-cdc"
+ sink.enable-2pc = "false"
+ sink.enable-delete = "true"
+ doris.config {
+ format = "json"
+ read_json_by_line = "true"
+ }
+ }
+}
-## Example
+```
-Use JSON format to import data
+### Use JSON format to import data
Review Comment:
"CSV and JSON, respectively.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]