Elasticsearch
Elasticsearch source connector
Descriptionâ
Used to read data from Elasticsearch.
support version >= 2.x and < 8.x.
Key featuresâ
Optionsâ
name | type | required | default value |
---|---|---|---|
hosts | array | yes | - |
username | string | no | - |
password | string | no | - |
index | string | yes | - |
source | array | no | - |
scroll_time | string | no | 1m |
scroll_size | int | no | 100 |
schema | no | - |
hosts [array]â
Elasticsearch cluster http address, the format is host:port
, allowing multiple hosts to be specified. Such as ["host1:9200", "host2:9200"]
.
username [string]â
x-pack username.
password [string]â
x-pack password.
index [string]â
Elasticsearch index name, support * fuzzy matching.
source [array]â
The fields of index.
You can get the document id by specifying the field _id
.If sink _id to other index,you need specify an alias for _id due to the Elasticsearch limit.
If you don't config source, you must config schema
.
scroll_time [String]â
Amount of time Elasticsearch will keep the search context alive for scroll requests.
scroll_size [int]â
Maximum number of hits to be returned with each Elasticsearch scroll request.
schemaâ
The structure of the data, including field names and field types.
If you don't config schema, you must config source
.
Examplesâ
simple
Elasticsearch {
hosts = ["localhost:9200"]
index = "seatunnel-*"
source = ["_id","name","age"]
}
complex
Elasticsearch {
hosts = ["elasticsearch:9200"]
index = "st_index"
schema = {
fields {
c_map = "map<string, tinyint>"
c_array = "array<tinyint>"
c_string = string
c_boolean = boolean
c_tinyint = tinyint
c_smallint = smallint
c_int = int
c_bigint = bigint
c_float = float
c_double = double
c_decimal = "decimal(2, 1)"
c_bytes = bytes
c_date = date
c_timestamp = timestamp
}
}
}
Changelogâ
2.3.0 2022-12-30â
- Add Elasticsearch Source Connector