dolphindb中不能将streamTable传入createPartitionedTable创建分布式表?

建表语句如下:

login("admin", "123456")
dbPath="dfs://thermalDB"
stream = streamTable(10000:0,`id`ts`tem,[SYMBOL,TIMESTAMP,DOUBLE])
dbDate = database(, VALUE, 2021.03.17..2031.03.17)
dbID = database(,  HASH,  [SYMBOL,  50])
db=database(dbPath, COMPO,  [dbDate,  dbID])
db.createPartitionedTable(stream, "pt", `ts`id)

报错:

A stream table does not support direct access. Please use sql query to retrieve data

请问问题出在哪里?

阅读 1.6k
1 个回答

传入到createPartitionedTable函数中的table不能是stream table,上面的建表语句可以这么写:

login("admin", "123456")
dbPath="dfs://thermalDB"


dbDate = database(, VALUE, 2021.03.17..2031.03.17)
dbID = database(,  HASH,  [SYMBOL,  50])
db=database(dbPath, COMPO,  [dbDate,  dbID])
t = table(1:0,`id`ts`tem,[SYMBOL,TIMESTAMP,DOUBLE])
db.createPartitionedTable(t, "pt", `ts`id)
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
logo
101 新手上路
子站问答
访问
宣传栏