From 59ecbdb3df4a6014558c4ca06ac064d6f538fa25 Mon Sep 17 00:00:00 2001 From: wuzexian <1027914152@qq.com> Date: Wed, 14 Aug 2024 10:30:41 +0800 Subject: [PATCH] add elasticsearch.md --- .../pipeline-connectors/elasticsearch.md | 242 ++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 docs/content/docs/connectors/pipeline-connectors/elasticsearch.md diff --git a/docs/content/docs/connectors/pipeline-connectors/elasticsearch.md b/docs/content/docs/connectors/pipeline-connectors/elasticsearch.md new file mode 100644 index 0000000000..c86924a9d9 --- /dev/null +++ b/docs/content/docs/connectors/pipeline-connectors/elasticsearch.md @@ -0,0 +1,242 @@ +--- +title: "Elasticsearch" +weight: 5 +type: docs +aliases: +- /connectors/pipeline-connectors/elasticsearch +--- + + +# Elasticsearch Connector + +This article introduces the Elasticsearch Connector + +## Example + +```yaml +source: + type: values + name: ValuesSource + +sink: + type: elasticsearch + name: Elasticsearch Sink + hosts: http://localhost:9200 + version: 8 + username: elastic + password: changeme + +pipeline: + parallelism: 1 +``` +## Connector Options + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionRequiredDefaultTypeDescription
typerequired(none)StringSpecify the Sink to use, here is 'elasticsearch'.
nameoptional(none)StringName of Pipeline
hostsrequired(none)StringThe comma-separated list of Elasticsearch hosts to connect to, e.g., http://localhost:9200.
usernameoptional(none)StringThe username for Elasticsearch authentication.
passwordoptional(none)StringThe password for Elasticsearch authentication.
versionoptional7IntegerThe version of Elasticsearch to connect to (6, 7, or 8).
batch.size.maxoptional500IntegerThe maximum number of actions to buffer for each bulk request.
inflight.requests.maxoptional5IntegerThe maximum number of concurrent requests that the sink will try to execute.
buffered.requests.maxoptional1000IntegerThe maximum number of requests to keep in the in-memory buffer.
batch.size.max.bytesoptional5242880 (5MB)LongThe maximum size of batch requests in bytes.
buffer.time.max.msoptional5000LongThe maximum time to wait for incomplete batches before flushing (in milliseconds).
record.size.max.bytesoptional10485760 (10MB)LongThe maximum size of a single record in bytes.
+
+ +## Data Type Mapping + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Flink CDC TypeElasticsearch TypeNote
CHAR / VARCHAR / STRINGtext
BOOLEANboolean
BINARY / VARBINARYbinary
DECIMALscaled_floatElasticsearch doesn't have a native decimal type. scaled_float is used as an approximation.
TINYINTbyte
SMALLINTshort
INTEGERinteger
BIGINTlong
FLOATfloat
DOUBLEdouble
DATEdate
TIMEkeywordStored as string in format HH:mm:ss.SSSSSS
TIMESTAMPdateStored with microsecond precision
ARRAY + array
MAP / ROWobject
+
+ +{{< top >}}