Hi,
I’m new to InfluxDB and maybe don’t understand the special behaviour of time series data bases.
I do the following with python:
jsondata =
for i in range(1000):
jsondata.append(
{
“measurement”: “NKK”,
“tags”: {
“position”: “51”,
},
“time”: datetime.now().strftime(‘%Y-%m-%dT%H:%M:%S.%fZ’),
“fields”: {
“value”: math.sin(time.time()/10.)+random.uniform(-0.1,0.1)
}
}
)client.write_points(jsondata,time_precision=‘u’,batch_size=100)
results = client.query(‘SELECT “value” FROM “nkktable”.“autogen”.“NKK” WHERE time > now() - 1d GROUP BY “position”’)
points1 = results.get_points(tags={‘position’:‘51’})
for i,point in enumerate(points1):
print(“%5i %s %f” % (i,point[‘time’], point[‘value’]))
what I get is not 1000 points but only about 50. If I select directly from database there are also only 50 values. So it seems that not all data have been stored.
What I’m doing wrong?
Best regards
Michael