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

Time Series query error with Redshift 'REAL' data type #204

Closed
doanbutar opened this issue Jan 26, 2023 · 6 comments · Fixed by #213
Closed

Time Series query error with Redshift 'REAL' data type #204

doanbutar opened this issue Jan 26, 2023 · 6 comments · Fixed by #213
Assignees
Labels
datasource/Redshift effort/medium 2 to 3 days type/bug Something isn't working

Comments

@doanbutar
Copy link

What happened?
When trying to create a Time Series visualization with a Redshift data source that has a column with data type REAL, the query fails with an HTTP 500 - Internal Server Error.

The same query is running on the same column with int data type works.

What was expected to happen?
Queries on REAL data type columns should also complete successfully.

Steps to reproduce the problem:

  1. Create a redshift cluster with a column with int data type
  2. Create a Time Series dashboard in Grafana
  3. Run a time series query that selects this int data type column
  4. Create additional column in redshift with real data type, and copy over int data to the real data type column
  5. Modify time series query to use real datatype column instead
  6. Query fails with "Internal Server Error" (see attached screenshot)

Version numbers (grafana, prometheus, graphite, plugins, operating system, etc.):
Grafana version: v8.4.7
Redshift version: v1.3.0
OS: Amazon Linux 2

Configuration information:
Redshift table schema is also attached as screenshot.

@doanbutar doanbutar added type/bug Something isn't working datasource/Redshift labels Jan 26, 2023
@doanbutar
Copy link
Author

//Redshift Int type
image

//Redshift listing table schema
image

//Redshift real type
Screenshot 2023-01-26 at 13 27 50

@doanbutar
Copy link
Author

Looking at this: #33
Inserting real datatype and also query seems to work fine.

@fridgepoet
Copy link
Member

fridgepoet commented Jan 26, 2023

Thanks @doanbutar for the detailed bug report.

I was able to reproduce the issue by:

  1. In AWS, create a redshift cluster
  2. Create a table with a column type real: create table foo(test real);
  3. Insert 1 value into the real column: insert into foo(test) values (1.111111);
  4. In Grafana, create a time series panel and execute the query select * from foo

Result: error message Query data error

(confirmed on same version as you and on latest Grafana 9.4.0-pre with Redshift 1.5.0)

@grafpat
Copy link

grafpat commented Feb 10, 2023

Hi @fridgepoet , any update here? I see that this has been moved to Backlog, is there any update on rough timeline that this will be worked on?

@fridgepoet
Copy link
Member

Hi @grafpat we don't have a firm timeline yet, will try to keep you informed when we pick this up.

@fridgepoet
Copy link
Member

For future readers: For testing this out, it's much easier to write a query like SELECT CAST('123456' AS REAL); than to create a cluster/table/column of a certain type.

@iwysiu iwysiu added the effort/medium 2 to 3 days label Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasource/Redshift effort/medium 2 to 3 days type/bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants