doupaimo8288 2016-08-09 11:55
浏览 1699

使用相同的时间戳将不同的测量点写入InfluxDB

Is it possible to write more than one point with the same timestamp into one measurement using InfluxDB. Problem is that i am saving data from loggers that have one timestamp and a measurements from many inverters for that timestamp and of course the points are getting owerwritten. How can i fix the problem?

The data is like:

time: 2016-08-09 12:10:08 inverter: 1 ...other fields

time: 2016-08-09 12:10:08 inverter: 2 ...other fields

time: 2016-08-09 12:10:08 inverter: 3 ...other fields

etc...

  • 写回答

1条回答 默认 最新

  • drhe80011 2016-08-12 16:49
    关注

    No, you can't have two entries with the same timestamp for the same measurement.

    From the InfluxDB documentation:

    Conceptually you can think of a measurement as an SQL table, where the primary index is always time. tags and fields are effectively columns in the table. tags are indexed, and fields are not.

    You can however use Influx's high timestamp precision. Your datetime's precision seems to be only seconds. Influx's timestamps are distinguished by nanoseconds. So you might use information such as the inverter index and "encode" it into the nanoseconds. This way, no two entries will collide on the same timestamp.

    评论

报告相同问题?

悬赏问题

  • ¥20 matlab计算中误差
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊