PiflowX-组件UnionAll

UnionAll组件

组件说明

Union多个输入源。输入源必须具有相同的字段类型。

计算引擎

flink

组件分组

common

端口

Inport:Any

outport:默认端口

组件属性

名称 展示名称 默认值 允许值 是否必填 描述 例子
inports Inports "" Inports string are separated by commas。 1,2

UnionAll示例配置

json 复制代码
{
  "flow": {
    "uuid": "7a5d97d288224a358a2d30ae8a229230",
    "runMode": "DEBUG",
    "name": "UnionAllTest",
    "engineType": "flink",
    "environment": {
      "runtimeMode": "batch"
    },
    "paths": [
      {
        "inport": "1",
        "from": "CsvStringParser1",
        "to": "UnionAll",
        "outport": ""
      },
      {
        "inport": "2",
        "from": "CsvStringParser2",
        "to": "UnionAll",
        "outport": ""
      },
      {
        "inport": "",
        "from": "UnionAll",
        "to": "ShowData",
        "outport": ""
      }
    ],
    "stops": [
      {
        "uuid": "0000",
        "name": "CsvStringParser1",
        "bundle": "cn.piflow.bundle.flink.file.CsvStringParser",
        "properties": {
          "content": "1,zs\n2,ls",
          "delimiter": ",",
          "schema": "id:int,name:string"
        }
      },
      {
        "uuid": "0000",
        "name": "CsvStringParser2",
        "bundle": "cn.piflow.bundle.flink.file.CsvStringParser",
        "properties": {
          "content": "1,zs\n3,ww",
          "delimiter": ",",
          "schema": "id:int,name:string"
        }
      },
      {
        "customizedProperties": {},
        "name": "UnionAll",
        "uuid": "0f0cf231dbf64852b17ac3ee2064134d",
        "bundle": "cn.piflow.bundle.flink.common.UnionAll",
        "properties": {
          "inports": "1,2"
        }
      },
      {
        "customizedProperties": {},
        "name": "ShowData",
        "uuid": "c2a84707d76b4083a74e46e6ea8cd5e3",
        "bundle": "cn.piflow.bundle.flink.common.ShowData",
        "properties": {
          "showNumber": "1000"
        }
      }
    ]
  }
}
示例说明

1.通过两个CsvStringParser组件解析字符串类型的csv数据;

2.使用UnionAll组件将2个数据源的数据连接起来;

3.使用ShowData组件将union后的数据打印在控制台。

演示DEMO
相关推荐
wanhengidc1 小时前
云计算时代 云手机与云服务器的不同
服务器·智能手机·云计算
ascarl20106 小时前
记录一下es节点掉线后修复好了的情况
运维·jenkins
j***29486 小时前
IPV6公网暴露下的OPENWRT防火墙安全设置(只允许访问局域网中指定服务器指定端口其余拒绝)
服务器·安全·php
ao_lang6 小时前
数据链路层
linux·服务器·网络
safestar20127 小时前
Elasticsearch深度实战:从分布式原理到生产环境踩坑全记录
运维·搜索引擎·全文检索·es
额呃呃7 小时前
零拷贝I/O的核心概念
服务器·php·apache
小兔薯了8 小时前
7. LNMP-wordpress
android·运维·服务器·数据库·nginx·php
福尔摩斯张8 小时前
Linux进程间通信(IPC)机制深度解析与实践指南
linux·运维·服务器·数据结构·c++·算法
Protein_zmm8 小时前
Wireshark实验一:Web 浏览器与服务器的协议报文捕获与分析
服务器·测试工具·wireshark
cookies_s_s8 小时前
项目--协程库(C++)前置知识篇
linux·服务器·c++