Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query doesn't return result / returns partial result, when there is change in datatype of a field in that time range. #24938

Open
faiz-hcs opened this issue Apr 24, 2024 · 3 comments

Comments

@faiz-hcs
Copy link

faiz-hcs commented Apr 24, 2024

Steps to reproduce:

  1. Need a bucket where there is a change in datatype of a field.
  2. Run Query for the time-range which will consist of data where datatype of field has changed.

Expected behaviour:

  1. The query should return all of the data available in the specified time range.

Actual behaviour:

  1. The query returns either no data, or partial data.
  • Query returns No data.
    Screenshot No data
  • Query returns data & data type is int (time range is subset of above time range)
    Screenshot datatype integer
  • Datatype is string (screenshot also shows partial data returned , as this time range has more data as can be seen in above screenshot)
    Screenshot_string_datatype

Link to issue on Influx forum :
https://community.influxdata.com/t/flux-query-does-not-return-results-if-wider-time-range-is-selected/33750/9

Environment info:

Note: Upgrading to the latest version didn't fix the issue

docker run --name influxdb -d -p 8086:8086 --volume c:\projects\test_influxdata_3:/var/lib/influxdb2 --volume c:\projects\test_influxdata_3\config:/etc/influxdb2 influxdb:2.7.1 

Config:
Default config.

Logs:
No error messages in the Logs as well as flux query logs.

@latonita
Copy link

I had same problem with v2.6.1. There was integer/double type change of value field which was unnoticed.
The only workaround was to export data, clean table and import it back.

@faiz-hcs
Copy link
Author

faiz-hcs commented May 2, 2024

I had same problem with v2.6.1. There was integer/double type change of value field which was unnoticed. The only workaround was to export data, clean table and import it back.

Hi @latonita How did you exactly clean the data? and also how did you export and import it ?

@latonita
Copy link

latonita commented May 2, 2024

@faiz-hcs I was using influxdb ui.
I have identified few records with wrong data type,
just saved those values on a paper and deleted it from the DB with CLI,
then I made a query in Data Explorer which returns all the data and saved to csv with 'save to csv' :) button
then added missing records to CSV file
then uploaded CSV with "Load data" section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants