Skip to content

Commit

Permalink
[Fix][Doc] Update Elasticsearch Sink and Oracle CDC Source Sample Con…
Browse files Browse the repository at this point in the history
…figuration (#8425)
  • Loading branch information
bwcxyk authored Jan 2, 2025
1 parent 67a114c commit 45bbaf5
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 43 deletions.
29 changes: 27 additions & 2 deletions docs/en/connector-v2/sink/Elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,31 @@ Option introduction:

Simple

```bash
```conf
sink {
Elasticsearch {
hosts = ["localhost:9200"]
index = "seatunnel-${age}"
schema_save_mode="IGNORE"
}
}
```
Multi-table writing

```conf
sink {
Elasticsearch {
hosts = ["localhost:9200"]
index = "${table_name}"
schema_save_mode="IGNORE"
}
}
```

CDC(Change data capture) event

```bash
```conf
sink {
Elasticsearch {
hosts = ["localhost:9200"]
Expand All @@ -148,6 +160,19 @@ sink {
primary_keys = ["key1", "key2", ...]
}
}
```
CDC(Change data capture) event Multi-table writing

```conf
sink {
Elasticsearch {
hosts = ["localhost:9200"]
index = "${table_name}"
schema_save_mode="IGNORE"
primary_keys = ["${primary_key}"]
}
}
```

SSL (Disable certificates validation)
Expand Down
75 changes: 36 additions & 39 deletions docs/en/connector-v2/source/Oracle-CDC.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,55 +292,53 @@ source {
password = "oracle"
database-names = ["XE"]
schema-names = ["DEBEZIUM"]
table-names = ["XE.DEBEZIUM.FULL_TYPES", "XE.DEBEZIUM.FULL_TYPES2"]
base-url = "jdbc:oracle:thin:@oracle-host:1521:xe"
source.reader.close.timeout = 120000
}
}
```

> Use the select count(*) instead of analysis table for count table rows in full stage
```conf
source {
# This is a example source plugin **only for test and demonstrate the feature source plugin**
Oracle-CDC {
plugin_output = "customers"
use_select_count = true
username = "system"
password = "oracle"
database-names = ["XE"]
schema-names = ["DEBEZIUM"]
table-names = ["XE.DEBEZIUM.FULL_TYPES"]
base-url = "jdbc:oracle:thin:system/oracle@oracle-host:1521:xe"
source.reader.close.timeout = 120000
}
}
```

> Use the select count(*) instead of analysis table for count table rows in full stage
>
> ```conf
> source {
> # This is a example source plugin **only for test and demonstrate the feature source plugin**
> Oracle-CDC {
> plugin_output = "customers"
> use_select_count = true
> username = "system"
> password = "oracle"
> database-names = ["XE"]
> schema-names = ["DEBEZIUM"]
> table-names = ["XE.DEBEZIUM.FULL_TYPES"]
> base-url = "jdbc:oracle:thin:system/oracle@oracle-host:1521:xe"
> source.reader.close.timeout = 120000
> }
> }
> ```
>
> Use the select NUM_ROWS from all_tables for the table rows but skip the analyze table.
>
> ```conf
> source {
> # This is a example source plugin **only for test and demonstrate the feature source plugin**
> Oracle-CDC {
> plugin_output = "customers"
> skip_analyze = true
> username = "system"
> password = "oracle"
> database-names = ["XE"]
> schema-names = ["DEBEZIUM"]
> table-names = ["XE.DEBEZIUM.FULL_TYPES"]
> base-url = "jdbc:oracle:thin:system/oracle@oracle-host:1521:xe"
> source.reader.close.timeout = 120000
> }
> }
> ```
### Support custom primary key for table
```conf
source {
# This is a example source plugin **only for test and demonstrate the feature source plugin**
Oracle-CDC {
plugin_output = "customers"
skip_analyze = true
username = "system"
password = "oracle"
database-names = ["XE"]
schema-names = ["DEBEZIUM"]
table-names = ["XE.DEBEZIUM.FULL_TYPES"]
base-url = "jdbc:oracle:thin:system/oracle@oracle-host:1521:xe"
source.reader.close.timeout = 120000
}
}
```

### Support custom primary key for table

```conf
source {
Oracle-CDC {
plugin_output = "customers"
Expand All @@ -359,7 +357,6 @@ source {
]
}
}

```

### Support debezium-compatible format send to kafka
Expand Down
30 changes: 28 additions & 2 deletions docs/zh/connector-v2/sink/Elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Sink插件常用参数,请参考 [Sink常用选项](../sink-common-options.md)

简单示例

```bash
```conf
sink {
Elasticsearch {
hosts = ["localhost:9200"]
Expand All @@ -135,9 +135,21 @@ sink {
}
```

多表写入

```conf
sink {
Elasticsearch {
hosts = ["localhost:9200"]
index = "${table_name}"
schema_save_mode="IGNORE"
}
}
```

变更数据捕获 (Change data capture) 事件

```bash
```conf
sink {
Elasticsearch {
hosts = ["localhost:9200"]
Expand All @@ -149,6 +161,20 @@ sink {
}
```

```
变更数据捕获 (Change data capture) 事件多表写入
```conf
sink {
Elasticsearch {
hosts = ["localhost:9200"]
index = "${table_name}"
schema_save_mode="IGNORE"
primary_keys = ["${primary_key}"]
}
}
```

SSL 禁用证书验证

```hocon
Expand Down

0 comments on commit 45bbaf5

Please sign in to comment.