influxdb - 在 influxdb 中创建用户表
问题描述
我正在尝试在 influxdb 中创建一个包含用户名和密码的简单表。但是我无法这样做,因为创建表始终需要标签。我想创建一个以用户名和密码作为字段键的表。我写的查询是:
insert users,password value=password,admin value=admin
Error: missing tag value
请帮忙。提前致谢。
解决方案
标签是可选的。
您的查询应该是:
insert tablename password="yourpasswordvalue",user="yourusername"
由线路协议https://docs.influxdata.com/influxdb/v1.7/write_protocols/line_protocol_tutorial/指定
验证
> select * from tablename
name: tablename
time password user
---- -------- ----
1552757801383612800 yourpasswordvalue yourusername
推荐阅读
- javascript - 如何将对象数组传递给 Query?
- python - 将元组从函数“导出”到全局变量
- typescript - 从组件获取数据
- azure - 端点 webhook url 上的事件网格订阅的 ARM 部署失败
- hdf5 - 如何将 HDF5 数据集作为 Snakemake 输入/输出?
- ios - 我希望打印的值太长,无法打印 firebase 中的所有值
- excel - 如何从工作表中读取值并检查它们是否存在于 .txt 文件中
- project-reactor - Reactor 项目中的 Fuseable 接口有什么用?
- javascript - 如何在 React 中调用注入到 ReactNative 的 WebView 中的 JavaScript 代码?
- c# - 如何使用 Angular 7 保持 AngularCLIServer 在 asp.net 核心上的构建之间运行