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

Bug: Empty rows on column types "time" cause unwanted behavior #170

Closed
gdassori opened this issue Mar 2, 2022 · 4 comments
Closed

Bug: Empty rows on column types "time" cause unwanted behavior #170

gdassori opened this issue Mar 2, 2022 · 4 comments
Labels
type/bug Unexpected behavior or a feature is broken

Comments

@gdassori
Copy link

gdassori commented Mar 2, 2022

Hello. Thanks for your plugin.

If I define the type Time on a column, and the CSV data-source return some empty rows, the whole table values are not rendered:

As you can see in the screenshots, if I set the type String some values are returned (and turned into NaN by the table panel column override rules), but if I set Time (which would allow sorting and avoid the NaN glitches) nothing is shown.

(Sorry for the wild blurring, but personal information all around).

image

image

@marcusolsson
Copy link
Contributor

marcusolsson commented Mar 9, 2022

Thanks for reporting! I can confirm that I'm able to reproduce this with the following CSV data:

time,value
,20
2022-03-02 11:52:57, 10
,20
2022-03-02 11:44:06, 10
,20

Screenshot 2022-03-09 at 16 26 19@2x

@marcusolsson marcusolsson added type/bug Unexpected behavior or a feature is broken and removed priority/awaiting-more-evidence labels Mar 9, 2022
@lalithkumar-toast
Copy link

@marcusolsson Is it possible to to convert integer to data time value. As Checked the code based it is able to convert the values to int to date time. But currently I am using Dropwizard & it gives the headed name as "t". Can you help me on this.

Sample data:
t,count,mean_rate,m1_rate,m5_rate,m15_rate,rate_unit
1651239776,0,0.000000,0.000000,0.000000,0.000000,events/day
1651239836,0,0.000000,0.000000,0.000000,0.000000,events/day
1651239896,0,0.000000,0.000000,0.000000,0.000000,events/day
1651239956,0,0.000000,0.000000,0.000000,0.000000,events/day
1651240016,0,0.000000,0.000000,0.000000,0.000000,events/day
1651240076,0,0.000000,0.000000,0.000000,0.000000,events/day

So the field one is Unix Timestamp. It would be a great help.

@MarcosSB
Copy link

I am able to reproduce it as well
image
But if you use an alias "time" the dates are correct!
image

@yesoreyeram
Copy link
Collaborator

Hiya. Can you try this with Infinity datasource plugin and see if you are having issues with it as well?

In an effort to unify the JSON/CSV/XML datasource plugins in Grafana, we are planning to deprecate this plugin in favour of Infinity datasource plugin which is actively maintained by Grafana. So I would recommend you to consider switching to Infinity datasource plugin insead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Unexpected behavior or a feature is broken
Projects
Status: Complete
Development

No branches or pull requests

5 participants