Timestamps in relation to query method - they are different - DataExplorer confusion

I have upgraded influxdb from 1.8 to 2.6

I use a lot sensors, some of them produce incorrect values or are delivered falsely by mqtt.
Deleting those values have always been a very disturbing tasks with influxdb. I had hoped that this process might have been addressed, unfortunately not. However,
to delete those values I need to find out the timestamp because that is the only way to delete a _field value, insane but true.

I can use two different query methods to find out the timestamp of a datapoint

  1. Flux via DataExplorer
    Values for _time have nothing to do with the real values, raw data is even more confusing. Shows values that aren’t even recorded. Some sort of intepolation it seems.

sonoff.0.Strom-Gas.Gas_Verbrauch gestern m_ value 3.93 2023-01-10T17:30:51.000Z 2023-01-13T17:30:51.823Z 2023-01-12T23:05:28.778Z

  1. influx v1 shell
    precision rfc3339
    Select query brings up this result:

2023-01-12T22:59:57.676Z ┃system.adapter.sonoff.0 ┃ 3.9300000000

so in this example it is 23:05:28 vs 22:59:57

The latter is the correct value.

I don’t understand the DataExplorer concept. See attachment
How do get my real values?
What is going on here?

And if there is a normal way of doing this (delete a single datapoint) please tell me

@penholder By default, the Data Explorer structures the query to downsample the data based on the pixel width of the visualization. This returns results quicker and only returns the maximum number of results that a visualization can actually render.

In the process of downsampling, it windows the data, applies an aggregate function to all the values within each window, then uses the _stop boundary of each window as the new timestamp.

You need to remove the downsampling to get your actual timestamps. To remove the downsampling, you can do one of following:

  • In the Query Builder, under “Aggregate Function,” select “Custom,” then deselect the selected aggregate function:

  • Switch over the Script Editor and delete the line with aggregateWindow(...).

Many thanks @scott for pointing that out.

Is there a way to do that without a browser?
In a console?

@penholder There are a couple of ways:

@scott That was very helpful. Thank you.

1 Like