I am struggling with ns resolution timestamps from an influxDB (node-red-contrib-influxdb). The data is high-resolution acceleration data with a sampling frequency of several kHz. To make exact timestamps I would need ns resolution. Saving the data to the database works and in the DB it is stored with correct precision (see picture). After the query, the last digits are replaced by zeros. Any guesses what I can do in this particular case?
I get the data via MQTT and want to store it in a database first. Than you should be able to retrieve the data from the DB via dashboard and make a csv export.
The picture in the first post shows the raw output. Below is the formatet output. Then it also formats the timestamp another way:
If the influxdb node is getting in the way, don't forget that you can submit data to InfluxDB directly via its REST API. The line protocol is text rather than anything else so you can submit data to ns precision that way.
Why are you getting it out of influx and then storing it in a database? It is already in a database (influx).
If you do need to store it in another db then will that db support those large numbers?
What are you going to do with the csv export?
As @TotallyInformation says, if you need to fetch the full precision timestamp you should be able to do it directly rather than using the influxdb node.