Insert data from the past

Hi there,
I have a iot sensor which is sending the current measured value and the payload also contains historical measurements from the last 7 hours.
Is there a way to insert the historical measurements into influxdb? Just tried to overwrite the “time” field but it seems not to work. Any hints?
Thanks

If the data contains the timestamp (in a supported format) you can use it and the data will be just fine, otherwise InfluxDB will use the insertion timestamp

Thanks for your answer.
I am just working with Node-Red and pushing the payload into the database.
Just tried the following format:

{"device_eui":"0080E115005A0774","timestamp":"2024-06-08T22:15:18.000Z","volume":159.613,"source_time":"2024-11-08T02:15:18.000Z","lat":"0","lon":"0","time":"1717884918"}

I thought that “time” (epoch) would do it but no data is appearing in the database.
Any ideas?

The epoch format is the easiest one to handle, but I have no idea how Node-Red sends those data…
are you writing directly to the database?
which method and format do you use?

You need to know how that information gets serialized before being sent to InfluxDB, something is missing there…

Hi,
just found the solution:
in Node-Red you have to pass the payload to the influxin-node with a “time” which contains the unix timestamp in milliseconds. When pushing this to influxdb it will save the dataset in the past.
Thanks for your support!