您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

大数据InfluxDB 在C#中用法

bubuko 2022/1/25 19:23:57 dotnet 字数 1451 阅读 976 来源 http://www.bubuko.com/infolist-5-1.html

以前项目里用的都是SQL Server,现在想办法不用盗版了 InfluxDB看起来还挺好的,最近试试,吧以前的测温软件/MQTT采集中心改成这个 从123表里查var client = new RestClient("http://localhost:8086/query?db=123&q=SEL ...

以前项目里用的都是SQL Server,现在想办法不用盗版了

InfluxDB看起来还挺好的,最近试试,吧以前的测温软件/MQTT采集中心改成这个

从123表里查
var client = new RestClient("http://localhost:8086/query?db=123&q=SELECT * FROM \"mymeas\"");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);


往123表里写索引键mymeas
var client = new RestClient("http://localhost:8086/write?db=123&precision=s");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "text/plain");
request.AddParameter("text/plain", "mymeas,mytag=1 myfield=90 1463683075",  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

 

技术分享图片

 

 

技术分享图片

 

大数据InfluxDB 在C#中用法

原文:https://www.cnblogs.com/dXIOT/p/13885992.html


如果您也喜欢它,动动您的小指点个赞吧

除非注明,文章均由 laddyq.com 整理发布,欢迎转载。

转载请注明:
链接:http://laddyq.com
来源:laddyq.com
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


联系我
置顶