6

I am trying to write an influxdb query such that a measurement looks like

dummydata value=1,2,3,4

and influxdb doesn't like this format. I'm guessing influxdb cannot do this, but I can't find any documentation that says it cannot, nor do I see a feasible workaround. I have to write 500 points per timestamp: it seems to me that 500 separate measurements per timestamp would get hairy quick.

So:

  1. Can influxdb accept an array/list as a value
  2. If not, is there a workaround
  3. Or is influxdb just the wrong tool for this job?

Thanks in advance.

Dan Steingart
  • 765
  • 1
  • 7
  • 15

1 Answers1

5

InfluxDB accepts strings, float64s, int64s, and booleans as field values.

it seems to me that 500 separate measurements per timestamp would get hairy quick.

That's where you are mistaken. InfluxDB 0.10+ is specifically designed to encourage multiple fields per point, where a field is a measured value. What you want to write is a point like this:

dummydata value=1,value2=2,value3=3,value4=4...

beckettsean
  • 1,826
  • 11
  • 7
  • 1
    (3 years later) That seems super verbose. It adds significant "dead bytes" to the send package. I guess one could write a wrapper to turn a simple array into this sort of string, but I just assumed use mongodb 3 years ago and that's been that. – Dan Steingart Apr 19 '19 at 16:36