Didnt get output as shown in tutorial

Hi,

I have followed this tutorial of streaming.  https://www.dolphindb.cn/cn/help/200/DatabaseandDistributedComputing/Streaming.html

I  have setup everything as described in the tutorial.

Then I ran the code. After completion I get  60,000,000 from running this code on DFS_NODE1

trades=loadTable("dfs://STREAM_TEST", `trades)

select count(*) from trades


And  20,000,000from running this code on DFS_NODE2 

select count(*) from trades_stream_slave


But when I run this code on DFS_NODE1 I didnt get any results . It says " No Record Found"

select * from vwap_stream

Please help me solve this issue as soon as possible.

请先 登录 后评论

最佳答案 2022-02-01 19:47

Yes, there is an issue here. After executing the demo script, I used getStreamingStat().subworkers to check the subscription status and found an error:

topic=localhost:8848:local8848/trades_stream/vwap msgId=59999999 length=100000 exception=The number of columns of the table to insert must be the same as that of the original table.

To fix this issue, simply put the second line of code in Step 4

tmpTrades = table(n:0, colNames, colTypes)

Change to the following:

tmpTrades = table(n:0, `time`sym`qty`price, [TIME,SYMBOL,INT,DOUBLE])

请先 登录 后评论

其它 0 个回答

  • 1 关注
  • 0 收藏,906 浏览
  • Vishvesh Upadhyay 提出于 2022-01-31 20:40

相似问题