#查看组 SHOW STORAGE GROUP #创建TIMESERIES CREATE TIMESERIES root.ln.wf01.wt01.status WITH DATATYPE=BOOLEAN, ENCODING=PLAIN CREATE TIMESERIES root.ln.wf01.wt01.temperature WITH DATATYPE=FLOAT, ENCODING=RLE CREATE TIMESERIES root.ln.wf01.wt01.dag_id WITH DATATYPE=TEXT, ENCODING=PLAIN CREATE TIMESERIES root.ln.wf01.wt01.id WITH DATATYPE=INT32, ENCODING=PLAIN CREATE TIMESERIES root.ln.wf01.wt01.state WITH DATATYPE=TEXT, ENCODING=PLAIN #查看表 SHOW TIMESERIES SHOW TIMESERIES root.ln.wf01.wt01.status #插入数据 INSERT INTO root.ln.wf01.wt01(timestamp,status) values(100,true); INSERT INTO root.ln.wf01.wt01(timestamp,status,temperature) values(200,false,20.71) INSERT INTO root.ln.wf01.wt01(timestamp,id,dag_id,state) values(400,1,'test','success') #查询数据 SELECT status FROM root.ln.wf01.wt01 SELECT id,dag_id,state FROM root.ln.wf01.wt01 # 插入更新 别名、标签、属性 ALTER timeseries root.turbine.d1.s1 UPSERT ALIAS=newAlias TAGS(unit=Degree, owner=me) ATTRIBUTES(description=ha, newAttr=v1) # 删除表 delete from root.ln.wf01.wt01 # 查询最大最小时间 select MIN_TIME(id),MAX_TIME(id) from root.ln.wf01.wt01 #插入当前时间 insert into root.ln.wf01.wt01(timestamp,id,dag_id,state) values(now(),1,'www','failure')