重启dolphindb服务后怎样再次获取持久化到磁盘的streamTable?

我新建了一个streamTable,并且持久化到磁盘了,重启dolphindb服务后,请问下怎样再次获取到这个表,然后设置共享?

colName=["time","x"]
colType=["timestamp","int"]
t = streamTable(100:0, colName, colType);
enableTableShareAndPersistence(table=t, tableName=`st, cacheSize=1200000)
go;

for(s in 0:200){
    n=10000
    time=2019.01.01T00:00:00.000+s*n+1..n
    x=rand(10.0, n)
    insert into st values(time, x)
}
请先 登录 后评论

1 个回答

Jax Wu

重启dolphindb后,连接上创建该流表并进行持久化的节点,再次执行:

colName=["time","x"]
colType=["timestamp","int"]
t = streamTable(100:0, colName, colType);
enableTableShareAndPersistence(table=t, tableName=`st, cacheSize=1200000)

就可以将持久化到磁盘的流数据加载进来。

如果想设置启动dolphindb自动加载,可以参考教程:DolphinDB启动脚本
https://gitee.com/dolphindb/T...

请先 登录 后评论