ekuiper icon indicating copy to clipboard operation
ekuiper copied to clipboard

Union streams

Open lpf4254302 opened this issue 1 year ago • 3 comments

What would you like to be added/modified: Multi Topic Source {"sql":"create stream lpf_stream () WITH ( datasource = "topic/t1,topic/t2,topic/t3", FORMAT = "json", TYPE="mqtt")"} or { "id": "multi1", "name": "multi1", "graph": { "nodes": { "device1": { "type": "source", "nodeType": "httppush", "props": { "datasource": "/iot/alarm1" } }, "device2": { "type": "source", "nodeType": "httppush", "props": { "datasource": "/iot/alarm2" } }, "humidityFilter": { "type": "operator", "nodeType": "filter", "props": { "expr": "humidity > 30" } }, "logout1": { "type": "sink", "nodeType": "log" } }, "topo": { "sources": [ "device1", "device2" ], "edges": { "device1": ["humidityFilter"], "device2": ["humidityFilter"], "humidityFilter": ["logout1"] } } } } Why is this needed: Wildcard mode allows you to subscribe to multiple topics, but sometimes multiple topics cannot be represented by wildcards

lpf4254302 avatar Sep 22 '23 02:09 lpf4254302

Thank you for bringing this up. A general "merge" node may be needed to merge not only different topics of the same source but also any type of data sources into one. It is not a problem in graph API. Any idea if SQL has such similar syntax?

ngjaying avatar Sep 22 '23 02:09 ngjaying

Thank you for bringing this up. A general "merge" node may be needed to merge not only different topics of the same source but also any type of data sources into one. It is not a problem in graph API. Any idea if SQL has such similar syntax?

sql: (select * from root.sg1.t1) union all (select * from root.sg1.t2) or select * from root.sg1.t1,root.sg1.t2

lpf4254302 avatar Sep 22 '23 02:09 lpf4254302

I'd like to have a try on this issue. Can you assign it to me. 😊 @ngjaying

wfnuser avatar Apr 08 '24 03:04 wfnuser