sequence number vs time column
Hi!
I wrote a little script to migrate historical whisper (graphite) data to influxDB. The script commits point by point and the output is kind of funky when being looked at from the "webinterface".
I also might wanna add columns later to a time_series but it seems the 8083 webinterface doesn't like columns not being updated at the same time (different sequence number).
Am i working against the intended data model or is it a problem with the webinterface?
http://i.imgur.com/jJnmERu.png
https://github.com/damaex17/whisper-to-influxDB
hey @damaex17 did you mean to close this issue ? Anyway, this is my answer to your questions, I replied through email but for some reason the email didn't go through. I'll include it here for future reference in case someone else ran into the same issue
The script commits point by point and the output is kind of funky when being looked at from the "webinterface".
You have to define what "funky" is. We can't really help you without more information.
I also might wanna add columns later to a time_series but it seems the 8083 webinterface doesn't like columns not being updated at the same time (different sequence number).
InfluxDB assign new points a different sequence_number which is guaranteed to be unique across the entire cluster and across all points. This guarantees that two points with the same timestamp won't collide.
You have two options if you want to load different columns separately, either normalize them in the client and send them together, or update points by setting the timestamp and sequence_number in the write payload.
I didn't find any performance difference between the two approaches. So I figured it was a matter of my personal preference how I wanna organize my data and closed the ticket. Thank you for the heads up on the sequence_number. I didn't take this into account.
>>> client.query("select * from tracker-001_cpu where time > '2014-04-01 13:00' LIMIT 1")
[{u'points': [[1396360500, 1056030001, u'17.000000']], u'name': u'tracker-001_cpu', u'columns': [u'time', u'sequence_number', u'value']}]
>>> client.query("select cpu from tracker-001 where time > '2014-04-01 13:00' LIMIT 1")
[{u'points': [[1396360500, 1490070001, u'17.000000']], u'name': u'tracker-001', u'columns': [u'time', u'sequence_number', u'cpu']}]