使用 dolphindb subscribeTable 后,输出 table 中未摄取任何数据

no data ingested in the output table after using dolphindb subscribeTable

DolphinDB subscribeTable 使用处理程序过滤数据并将数据插入输出 table,但输出中没有数据 table。

share streamTable(1000:0, `time`a, [TIMESTAMP, DOUBLE]) as table1
share streamTable(1000:0, `time`a, [TIMESTAMP, DOUBLE]) as table2
def append_after_filtering(inputTable, msg){
t = select * from msg where a>100
insert into inputTable values(t.time,t.a)
}
subscribeTable(tableName="table1", actionName="test", offset=-1, handler=append_after_filtering{table2}, msgAsTable=true)

我订阅了table1,想过滤消息保存到table2,但是table2没有数据。

在定义handler时,需要修改inputTable,使用关键字mutable来表示可变参数。

share streamTable(1000:0, `time`a, [TIMESTAMP, DOUBLE]) as table1
share streamTable(1000:0, `time`a, [TIMESTAMP, DOUBLE]) as table2
def append_after_filtering(mutable inputTable, msg){
t = select * from msg where a>100
insert into inputTable values(t.time,t.a)
}
subscribeTable(tableName="table1", actionName="test", offset=-1, handler=append_after_filtering{table2}, msgAsTable=true)