我使用固定标记模式的TDengine已经有很长时间了。最新版本的TDengine似乎支持json的标记,它可以用不同的字段表示标记。我如何使用它,我应该如何使用它?
发布于 2022-02-21 13:06:08
这里见https://www.taosdata.com/docs/cn/v2.0/connector#json。
创建一个带有json标记的表:
# create stable
create stable s1 (ts timestamp, v1 int) tags (info json);
# create sub table
create table s1_1 using s1 tags ('{\"k1\": \"v1\"}');获取json数据
select tbname, info from s1
# s1 | '{"k1":"v1"}'查询键'k1':
select info->'k1' as k1 from s1;
select info->'k1' as k1 from s1 where info->'k1' = 'v1';https://stackoverflow.com/questions/71185558
复制相似问题