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

请问问题出在哪里?


请先 登录 后评论

2 个回答

chenweijian

传入到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)
请先 登录 后评论
qgb151

in run: Server response: 'enableTablePersistence(Trade, 1, 0, 10000) => To enable table persistence, turn on the persistence manager by specifying the configuration parameter persistenceDir for the publisher node.' script: '

请先 登录 后评论