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

相关推荐
库库的数据库笔记3 小时前
国产信创数据库的MySQL兼容性深度对比解析
大数据·数据库·mysql·oceanbase·政务
Elastic 中国社区官方博客4 小时前
我们如何通过 70 多个拉取请求,将 OpenTelemetry Java agent 迁移到 invokedynamic
java·大数据·开发语言·elasticsearch·搜索引擎·全文检索·es
珠海西格电力5 小时前
零碳园区管理系统的性能评估体系的行业标准
大数据·网络·人工智能·物联网·机器学习·架构·能源
杨先生哦6 小时前
SOC告警研判实战:海量告警降噪、误报甄别、内网风险处置全流程(上岗必用)
大数据
一线数智6 小时前
朱鹰:人的判断力,比算力更重要
大数据·人工智能
用户3610588626126 小时前
Flink ResourceManager启动流程源码深度剖析:从ClusterEntrypoint到Slot分配的完整链路
大数据
用户3610588626127 小时前
Flink ApplicationMaster启动流程源码深度剖析:从YARN提交到JobMaster启动的完整链路
大数据·flink
初心未改HD8 小时前
DSH Skill开发实战:SKILL.md是给LLM看的操作手册,不是给人看的README,踩了4个坑
java·大数据·开发语言
程序 代码狂人8 小时前
据仓库常见表类型详解(面试完整版,金融数仓适用)
大数据
阿里云大数据AI技术8 小时前
云栖实录|Hologres 5.0全新发布:Agent Native 的全模态实时数仓
大数据·人工智能·agent