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 column parsing error #88

Open
kkevvai opened this issue Aug 22, 2024 · 1 comment
Open

Time column parsing error #88

kkevvai opened this issue Aug 22, 2024 · 1 comment
Labels
bug Something isn't working more information needed More information is needed to debug this issue

Comments

@kkevvai
Copy link

kkevvai commented Aug 22, 2024

Describe the bug
I'm trying to run the following query

SELECT
  *
FROM
  mytable

where one or more columns in 'mytable' have the following format:
YYYY-MM-DDTHH:mm:ss.[milliseconds] e.g. , 2024-03-11T20:14:34.360
The following error is thrown in Grafana:
parsing time "2024-03-11T00:00:00Z": extra text: "T00:00:00Z"
Note:
When querying via,e.g, Tableau or JMP, these columns are parsed correctly.
Workaround:
STRING(timestamp_column) fixes the issue. However, I'd have to explicitly apply the STRING function for each appropriate column (these may not always be known).

Expected behavior
Timestamp columns are interpreted properly.

Screenshots
Screenshot 2024-08-21 201531

Environment:
Plugin Version: 1.3.0
Grafana Version: v11.1.0

@kkevvai kkevvai added the bug Something isn't working label Aug 22, 2024
@mullerpeter
Copy link
Owner

Hey @kkevvai

Thanks for opening the issue, but I'm not really able to reproduce the error you are getting.

Can you try to create a simple debug table like I do and tell me if the same error still happens? Or run a DESCRIBE TABLE and tell me the data type of your timestamp column which is not working?

CREATE TABLE debug (id INT, ts TIMESTAMP, value INT);

INSERT INTO debug VALUES
    (1, '2024-11-09T10:10:00.123456', 1),
    (2, '2024-11-09T10:11:02.323456', 2),
    (3, '2024-03-11T20:14:34.360', 3),
    (4, '2024-03-11T00:00:00Z', 4);

SELECT * FROM debug;

CleanShot 2024-11-09 at 10 24 35@2x

CleanShot 2024-11-09 at 10 23 54@2x

@mullerpeter mullerpeter added the more information needed More information is needed to debug this issue label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working more information needed More information is needed to debug this issue
Projects
None yet
Development

No branches or pull requests

2 participants