Elasticsearch
Descriptionâ
Output data to Elasticsearch
.
Key featuresâ
Engine Supported
- supported
ElasticSearch version is >= 2.x and < 8.x
Optionsâ
name | type | required | default value |
---|---|---|---|
hosts | array | yes | - |
index | string | yes | - |
index_type | string | no | |
primary_keys | list | no | |
key_delimiter | string | no | _ |
username | string | no | |
password | string | no | |
max_retry_count | int | no | 3 |
max_batch_size | int | no | 10 |
common-options | no | - |
hosts [array]â
Elasticsearch
cluster http address, the format is host:port
, allowing multiple hosts to be specified. Such as ["host1:9200", "host2:9200"]
.
index [string]â
Elasticsearch
index
name.Index support contains variables of field name,such as seatunnel_${age}
,and the field must appear at seatunnel row.
If not, we will treat it as a normal index.
index_type [string]â
Elasticsearch
index type, it is recommended not to specify in elasticsearch 6 and above
primary_keys [list]â
Primary key fields used to generate the document _id
, this is cdc required options.
key_delimiter [string]â
Delimiter for composite keys ("_" by default), e.g., "$" would result in document _id
"KEY1$KEY2$KEY3".
username [string]â
x-pack username
password [string]â
x-pack password
max_retry_count [int]â
one bulk request max try size
max_batch_size [int]â
batch bulk doc max size
common optionsâ
Sink plugin common parameters, please refer to Sink Common Options for details
Examplesâ
Simple
sink {
Elasticsearch {
hosts = ["localhost:9200"]
index = "seatunnel-${age}"
}
}
CDC(Change data capture) event
sink {
Elasticsearch {
hosts = ["localhost:9200"]
index = "seatunnel-${age}"
# cdc required options
primary_keys = ["key1", "key2", ...]
}
}
Changelogâ
2.2.0-beta 2022-09-26â
- Add Elasticsearch Sink Connector
2.3.0 2022-12-30â
- [Feature] Support CDC write DELETE/UPDATE/INSERT events (3673)