Skip to main content
Version: 2.1.0

Elasticsearch

Sink plugin : Elasticsearch [Flink]

Description​

Output data to ElasticSearch

Options​

nametyperequireddefault value
hostsarrayyes-
index_typestringnolog
index_time_formatstringnoyyyy.MM.dd
indexstringnoseatunnel
common-optionsstringno-
parallelismintno-

hosts [array]​

Elasticsearch cluster address, the format is host:port , allowing multiple hosts to be specified. Such as ["host1:9200", "host2:9200"] .

index_type [string]​

Elasticsearch index type

index_time_format [string]​

When the format in the index parameter is xxxx-${now} , index_time_format can specify the time format of the index name, and the default value is yyyy.MM.dd . The commonly used time formats are listed as follows:

SymbolDescription
yYear
MMonth
dDay of month
HHour in day (0-23)
mMinute in hour
sSecond in minute

See Java SimpleDateFormat for detailed time format syntax.

index [string]​

Elasticsearch index name. If you need to generate an index based on time, you can specify a time variable, such as seatunnel-${now} . now represents the current data processing time.

parallelism [Int]​

The parallelism of an individual operator, data source, or data sink

common options [string]​

Sink plugin common parameters, please refer to Sink Plugin for details

Examples​

elasticsearch {
hosts = ["localhost:9200"]
index = "seatunnel"
}

Write the result to the index of the Elasticsearch cluster named seatunnel