dolphindb - 关于“流表不支持直接访问的错误。请使用sql查询检索数据”
问题描述
我创建了一个流表:
colName=["time","x"]
colType=["timestamp","int"]
t = streamTable(100:0, colName, colType);
enableTableShareAndPersistence(table=t, tableName=`st, cacheSize=1200000)
然后我在其中插入两条数据:
time = 0..1 + now()
x = 10 20
data = table(time, x)
st.append!(data )
Select the data in time column:
st.time
错误显示:
A stream table does not support direct access. Please use sql query to retrieve data
我该如何解决?
解决方案
流表(streamTable)可以理解为一种特殊的内存表,目前不支持st.time访问方式,但支持SQL查询访问方式,如下:
select time from st
结果:|时间| |----| |2021.08.06T12:08:59.504| |2021.08.06T12:08:59.505|
推荐阅读
- typescript - 如何调用一个组件中的方法,它会调用另一个组件中的另一个方法?
- google-sheets - Google表格中线性回归的多个独立变量
- php - PHP Form-是否可以在同一个表名中插入多个输入字段
- openssl - 使用 InfluxDb 和 Telegraf for Grafana 时出现 Http TLS 握手错误
- python - 在 tkinter python 中的树视图中搜索项目
- reactjs - 服务器端渲染不适用于生产构建 Next.js
- git - 为什么我有多个 gitignore 文件?
- java - 如何使用java在物理打印机上打印长页?
- google-api - 如何重置 Google API 项目
- vba - 调用具有多个参数的子会导致编译错误