PiflowX组件 - Elasticsearch7Write

Elasticsearch7Write组件

组件说明

将数据写入到Elasticsearch-7引擎的索引中。

计算引擎

flink

组件分组

ElasticSearch

端口

Inport:默认端口

outport:默认端口

组件属性

名称 展示名称 默认值 允许值 是否必填 描述 例子
hosts hosts "" 要连接到的一台或多台Elasticsearch主机。 http://host_name:9092;http://host_name:9093
index index "" Elasticsearch中每条记录的索引。可以是一个静态索引(例如 'myIndex')或一个动态索引(例如 'index-{log_ts|yyyy-MM-dd}')。 myIndex
username Username "" 用于连接Elasticsearch实例的用户名。 root
password Password "" 用于连接Elasticsearch实例的密码。如果配置了username,则此选项也必须配置为非空字符串。 123456
tableDefinition TableDefinition "" Flink table定义。
properties PROPERTIES "" 连接器其他配置。

Elasticsearch7Write示例配置

json 复制代码
{
  "flow": {
    "name": "Elasticsearch7WriteTest",
    "uuid": "1234",
    "stops": [
      {
        "uuid": "1111",
        "name": "DataGen1",
        "bundle": "cn.piflow.bundle.flink.common.DataGen",
        "properties": {
          "schema": "[{\"filedName\":\"id\",\"filedType\":\"INT\",\"kind\":\"sequence\",\"start\":1,\"end\":10000},{\"filedName\":\"name\",\"filedType\":\"STRING\",\"kind\":\"random\",\"length\":15},{\"filedName\":\"age\",\"filedType\":\"INT\",\"kind\":\"random\",\"max\":100,\"min\":1}]",
          "count": "100",
          "ratio": "50"
        }
      },
      {
        "uuid": "2222",
        "name": "Elasticsearch7Write1",
        "bundle": "cn.piflow.bundle.flink.es7.Elasticsearch7Write",
        "properties": {
          "hosts": "192.168.186.102:9200",
          "index": "test",
          "tableDefinition": "{\"catalogName\":null,\"dbname\":null,\"tableName\":\"\",\"ifNotExists\":true,\"physicalColumnDefinition\":[{\"columnName\":\"id\",\"columnType\":\"INT\",\"comment\":\"id\"},{\"columnName\":\"name\",\"columnType\":\"STRING\",\"comment\":\"name\"},{\"columnName\":\"age\",\"columnType\":\"INT\"}],\"metadataColumnDefinition\":null,\"computedColumnDefinition\":null,\"watermarkDefinition\":null}",
          "properties": "{}"
        }
      },
      {
        "uuid": "3333",
        "name": "ShowData1",
        "bundle": "cn.piflow.bundle.flink.common.ShowData",
        "properties": {
          "showNumber": "100"
        }
      }
    ],
    "paths": [
      {
        "from": "DataGen1",
        "outport": "",
        "inport": "",
        "to": "Elasticsearch7Write1"
      },
      {
        "from": "DataGen1",
        "outport": "",
        "inport": "",
        "to": "ShowData1"
      }
    ]
  }
}
示例说明

本示例演示了通过DataGen生成100条测试数据,并使用Elasticsearch7Write组件将数据写入到es的test索引中。

演示DEMO

PiflowX-数据写入ES

相关推荐
诗旸的技术记录与分享7 小时前
Flink-1.19.0源码详解-番外补充3-StreamGraph图
大数据·flink
资讯分享周8 小时前
Alpha系统联结大数据、GPT两大功能,助力律所管理降本增效
大数据·gpt
G皮T9 小时前
【Elasticsearch】深度分页及其替代方案
大数据·elasticsearch·搜索引擎·scroll·检索·深度分页·search_after
TDengine (老段)10 小时前
TDengine STMT2 API 使用指南
java·大数据·物联网·时序数据库·iot·tdengine·涛思数据
华子w90892585911 小时前
基于 Python Django 和 Spark 的电力能耗数据分析系统设计与实现7000字论文实现
python·spark·django
用户Taobaoapi201411 小时前
母婴用品社媒种草效果量化:淘宝详情API+私域转化追踪案例
大数据·数据挖掘·数据分析
G皮T12 小时前
【Elasticsearch】检索排序 & 分页
大数据·elasticsearch·搜索引擎·排序·分页·检索·深度分页
无级程序员13 小时前
hive2服务启动报错:/tmp/hive on HDFS should be writable(不是chmod 777能解决的)
hive·hadoop·hdfs
Edingbrugh.南空13 小时前
Flink MySQL CDC 环境配置与验证
mysql·adb·flink
小新学习屋15 小时前
Spark从入门到熟悉(篇三)
大数据·分布式·spark