diff --git a/docs/content.zh/docs/connectors/pipeline-connectors/elasticsearch.md b/docs/content.zh/docs/connectors/pipeline-connectors/elasticsearch.md new file mode 100644 index 0000000000..ebf83dec83 --- /dev/null +++ b/docs/content.zh/docs/connectors/pipeline-connectors/elasticsearch.md @@ -0,0 +1,275 @@ +--- +title: "Elasticsearch" +weight: 4 +type: docs +aliases: +- /connectors/pipeline-connectors/elasticsearch +--- + + +# Elasticsearch Pipeline Connector + +Elasticsearch Pipeline 连接器可以用作 Pipeline 的 Data Sink, 将数据写入 Elasticsearch。 本文档介绍如何设置 Elasticsearch Pipeline 连接器。 + + +How to create Pipeline +---------------- + +从 MySQL 读取数据同步到 Elasticsearch 的 Pipeline 可以定义如下: + +```yaml +source: + type: mysql + name: MySQL Source + hostname: 127.0.0.1 + port: 3306 + username: admin + password: pass + tables: adb.\.*, bdb.user_table_[0-9]+, [app|web].order_\.* + server-id: 5401-5404 + +sink: + type: elasticsearch + name: Elasticsearch Sink + hosts: http://127.0.0.1:9092;http://127.0.0.1:9093 + +route: + - source-table: adb.\.* + sink-table: default_index + description: sync adb.\.* table to default_index + +pipeline: + name: MySQL to Elasticsearch Pipeline + parallelism: 2 +``` + +Pipeline Connector Options +---------------- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionRequiredDefaultTypeDescription
typerequired(none)String指定要使用的连接器, 这里需要设置成 'elasticsearch'.
nameoptional(none)StringSink 的名称。
hostsrequired(none)String要连接到的一台或多台 Elasticsearch 主机,例如: 'http://host_name:9092;http://host_name:9093'.
versionrequired7Integer指定要使用的连接器,有效值为: +
    +
  • 6: 连接到 Elasticsearch 6.x 的集群。
  • +
  • 7: 连接到 Elasticsearch 7.x 的集群。
  • +
  • 8: 连接到 Elasticsearch 8.x 的集群。
  • +
+
usernameoptional(none)String用于连接 Elasticsearch 实例认证的用户名。
passwordoptional(none)String用于连接 Elasticsearch 实例认证的密码。
batch.size.maxoptional500Integer每个批量请求的最大缓冲操作数。 可以设置为'0'来禁用它。
inflight.requests.maxoptional5Integer连接器将尝试执行的最大并发请求数。
buffered.requests.maxoptional1000Integer每个批量请求的内存缓冲区中保留的最大请求数。
batch.size.max.bytesoptional5242880Long每个批量请求的缓冲操作在内存中的最大值。
buffer.time.max.msoptional5000Long每个批量请求的缓冲 flush 操作的间隔。
record.size.max.bytesoptional10485760Long单个记录的最大大小(以byte为单位)。
+
+ +Usage Notes +-------- + +* The written index of Elasticsearch will be `namespace.schemaName.tableName` string of TableId,this can be changed using route function of pipeline. + +* The feature for automatic Elasticsearch index creation is not yet supported. + +Data Type Mapping +---------------- +Elasticsearch stores document in a JSON string. So the data type mapping is between Flink CDC data type and JSON data type. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CDC typeJSON typeNOTE
TINYINTNUMBER
SMALLINTNUMBER
INTNUMBER
BIGINTNUMBER
FLOATNUMBER
DOUBLENUMBER
DECIMAL(p, s)STRING
BOOLEANBOOLEAN
DATESTRING with format: date
TIMESTAMPSTRING with format: date-time
TIMESTAMP_LTZSTRING with format: date-time (with UTC time zone)
CHAR(n)STRING
VARCHAR(n)STRING
ARRAYARRAY
MAPSTRING
ROWSTRING
+
+ +{{< top >}} \ No newline at end of file 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..4a3eeb038b --- /dev/null +++ b/docs/content/docs/connectors/pipeline-connectors/elasticsearch.md @@ -0,0 +1,275 @@ +--- +title: "Elasticsearch" +weight: 4 +type: docs +aliases: +- /connectors/pipeline-connectors/elasticsearch +--- + + +# Elasticsearch Pipeline Connector + +The Elasticsearch Pipeline connector can be used as the *Data Sink* of the pipeline, and write data to Elasticsearch. This document describes how to set up the Elasticsearch Pipeline connector. + + +How to create Pipeline +---------------- + +The pipeline for reading data from MySQL and sink to Elasticsearch can be defined as follows: + +```yaml +source: + type: mysql + name: MySQL Source + hostname: 127.0.0.1 + port: 3306 + username: admin + password: pass + tables: adb.\.*, bdb.user_table_[0-9]+, [app|web].order_\.* + server-id: 5401-5404 + +sink: + type: elasticsearch + name: Elasticsearch Sink + hosts: http://127.0.0.1:9092;http://127.0.0.1:9093 + +route: + - source-table: adb.\.* + sink-table: default_index + description: sync adb.\.* table to default_index + +pipeline: + name: MySQL to Elasticsearch Pipeline + parallelism: 2 +``` + +Pipeline Connector Options +---------------- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionRequiredDefaultTypeDescription
typerequired(none)StringSpecify what connector to use, here should be 'elasticsearch'.
nameoptional(none)StringThe name of the sink.
hostsrequired(none)StringOne or more Elasticsearch hosts to connect to, e.g. 'http://host_name:9092;http://host_name:9093'.
versionrequired7IntegerSpecify what connector to use, valid values are: +
    +
  • 6: connect to Elasticsearch 6.x cluster.
  • +
  • 7: connect to Elasticsearch 7.x cluster.
  • +
  • 8: connect to Elasticsearch 8.x cluster.
  • +
+
usernameoptional(none)StringThe username for Elasticsearch authentication.
passwordoptional(none)StringThe password for Elasticsearch authentication.
batch.size.maxoptional500IntegerMaximum number of buffered actions per bulk request. Can be set to '0' to disable it.
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.bytesoptional5242880LongThe maximum size of batch requests in bytes.
buffer.time.max.msoptional5000LongThe maximum time to wait for incomplete batches before flushing.
record.size.max.bytesoptional10485760LongThe maximum size of a single record in bytes.
+
+ +Usage Notes +-------- + +* The written index of Elasticsearch will be `namespace.schemaName.tableName` string of TableId,this can be changed using route function of pipeline. + +* The feature for automatic Elasticsearch index creation is not yet supported. + +Data Type Mapping +---------------- +Elasticsearch stores document in a JSON string. So the data type mapping is between Flink CDC data type and JSON data type. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CDC typeJSON typeNOTE
TINYINTNUMBER
SMALLINTNUMBER
INTNUMBER
BIGINTNUMBER
FLOATNUMBER
DOUBLENUMBER
DECIMAL(p, s)STRING
BOOLEANBOOLEAN
DATESTRING with format: date
TIMESTAMPSTRING with format: date-time
TIMESTAMP_LTZSTRING with format: date-time (with UTC time zone)
CHAR(n)STRING
VARCHAR(n)STRING
ARRAYARRAY
MAPSTRING
ROWSTRING
+
+ +{{< top >}} \ No newline at end of file