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

相关推荐
涛思数据(TDengine)20 分钟前
TDengine TSDB 3.3.8.0 上线:SMA、TLS、TDgpt、taosX、taosgen 一次全进化
大数据·数据库·时序数据库·tdengine
研究司马懿31 分钟前
【GitOps】Argo CD app of apps
大数据·开发语言·elasticsearch·搜索引擎·云原生·argocd·gitops
qqxhb44 分钟前
系统架构设计师备考第49天——数字孪生体&云计算&大数据技术
大数据·系统架构·云计算·saas·paas·iaas·数字孪生体
盖雅工场1 小时前
企业用工成本高、留人难?零工管家以数字化管理实现精准控本与人才留存
大数据
hans汉斯2 小时前
【计算机科学与应用】基于多光谱成像与边缘计算的物流安全风险预警模式及系统实现
大数据·数据库·人工智能·设计模式·机器人·边缘计算·论文笔记
皮皮学姐分享-ppx2 小时前
上市公司CEO IT背景数据(2007-2024)
大数据·人工智能·经验分享·科技·区块链
呆呆小金人3 小时前
SQL入门:别名使用完全指南
大数据·数据库·数据仓库·sql·数据库开发·etl·etl工程师
隔壁寝室老吴3 小时前
Flink中自定义序列化器
大数据·flink
菜鸡儿齐9 小时前
spark组件-spark core(批处理)-rdd创建
大数据·分布式·spark
weixin_1772972206911 小时前
家政小程序系统开发:打造便捷高效的家政服务平台
大数据·小程序·家政