Why does the timestamp appear randomly generated when loading data?

Hi!

I have prepared a CSV with the following data.

#datatype measurement,tag,double,double,dateTime:RFC3339
name,building,temperature,humidity,time
iot-devices,5a,72.3,34.1,2024-01-01T12:01:00Z
iot-devices,5a,72.1,33.8,2024-01-02T12:01:00Z
iot-devices,5a,72.2,33.7,2024-01-03T12:01:00Z

(example taken from here > Import CSV Data into InfluxDB Using the Influx CLI and Python and Java Client Libraries | InfluxData)

When I query the data from the data explorer, I see this:

What could be happening?

Thanks a lot!!

I am uploading the data via de InfluxDB CLI for Windows.

Welcome @fabreciano

Can you please post your full query?

hi @grant1 ! I now know what the problem was.

I had a hidden aggregation in the query; possibly included by the query builder.

This is the query I had (it messed up the timestamps):

from(bucket: “PAR_ICA-net-power-data”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “iot-devices”)
|> filter(fn: (r) => r[“_field”] == “temperature”)
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: “mean”)

and I removed the aggregation part, so it looks like this:

from(bucket: “PAR_ICA-net-power-data”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “iot-devices”)
|> filter(fn: (r) => r[“_field”] == “temperature”)

And now, problem solved! Timestamps are OK.

Thanks for reaching out to help!

Fabricio.

Hi @fabreciano

Glad you solved it. I have had the “hidden aggregation” issue as well (I probably also posted on this same forum!) and that is what I suspected was causing the problem.