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
相关推荐
Saniffer_SH28 分钟前
【每日一题】一台可编程的PCIe 6.0主机 + 一套自动化CTS验证平台 + 一个轻量级链路分析系统
运维·服务器·测试工具·fpga开发·自动化·计算机外设·硬件架构
吕司28 分钟前
Linux线程的概念
linux·运维·服务器
河南博为智能科技有限公司35 分钟前
智能变电站辅控系统解决方案!
运维·边缘计算
江西省遂川县常驻深圳大使1 小时前
openclaw.json配置示例
服务器·json·openclaw
飞Link1 小时前
深度掌控 Agent 调试:LangGraph 本地服务器与 Studio 核心指南
运维·服务器·jvm
古月方枘Fry2 小时前
三层交换+单臂路由+ACL网络配置
服务器·网络·智能路由器
驾驭人生2 小时前
ASP.NET Core 实现 SSE 服务器推送|生产级实战教程(含跨域 / Nginx / 前端完整代码)
服务器·前端·nginx
CDN3602 小时前
SDK 游戏盾接入闪退 / 初始化失败?依赖冲突与兼容修复
运维·游戏·网络安全
KOYUELEC光与电子努力加油2 小时前
JAE日本航空电子推出满足汽车市场小型防水最新需求的MX80系列连接器
服务器·科技·单片机·汽车
C+++Python3 小时前
Linux/C++多进程
linux·运维·c++