Import CSV (only 32 rows of data) -> one record returned if range is more than 14 months

Hello,
I’m using influxdb v2.6.1
I loaded electricity meter readings for last 16 months for day and night tariffs.
CSV table for import

Now I’m trying to query it:

from(bucket: "home_data/autogen")
  |> range(start:-12mo) 
  |> filter(fn: (r) => r._measurement == "energy" and r.tariff == "T1")
  |> group(columns: ["_time"])
  |> sort(columns: ["_time"], desc: true)

It works okay, returns me 12 last rows (2024-04 and 2024-03).

Things get weird when I ask for more than 14 months of data - it returns only one oldest record.

What am I doing wrong?

@latonita How are you querying the data? What client are you using?

Tried two ways:

Ok, I see the issue. Notice that the type of your value field changed. In the first screenshot, the _value column (which represents the field value) is a float (double). In the second screenshot, the _value column is an integer (long).

While it’s technically possible for the same field to use different types when those types are isolated to different shards, at query time, it causes issues like this. There is a recent thread related to just this as well as a recent GitHub issue.

How did you import this CSV?

Interesting. I was trying hundred times to import CSV from influxdb ui, and failed, then loaded one record with Node-Red,
then was able to export CSV from influx ui and finally was able to load data.
I will try to clean all the records and then reload CSV from scratch.

Thanks again. I cleared all the data in this measurement, reuploaded the CSV and it works now