报错解释:在subscribeTable时通过tableName参数指定订阅的数据表名,该表必须为共享的流数据表,否则报错
解决方法:将需要订阅的流表创建为共享流数据表,检查一下您的tableName参数对应的表是否可能是普通流表
可以用以下语句创建共享流表:
使用share创建共享流表
t1= streamTable(1 2 3 as id, 4 5 6 as value); share t1 as table1;
使用enableTableShareAndPersistence创建持久化共享流表
colName=["time","x"] colType=["timestamp","int"] t = streamTable(100:0, colName, colType); enableTableShareAndPersistence(table=t, tableName=`table2, cacheSize=1200000)