Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

feature request: Add support for csvq #58

Closed
jftuga opened this issue Apr 18, 2021 · 2 comments
Closed

feature request: Add support for csvq #58

jftuga opened this issue Apr 18, 2021 · 2 comments
Labels
type/feature-request Requested new feature or enhancement

Comments

@jftuga
Copy link

jftuga commented Apr 18, 2021

Please consider adding support for csvq. This will allow for using an SQL-like query language for CSV data.

One benefit from would include the ability to add a delta column to the CSV table using SQL LAG() or LEAD() functions.

Example:

Original CSV, named test.csv:

Date, Processed
2021-04-15, 300
2021-04-14, 275

Augmented output with csvq could then be rendered in Grafana like this:

csvq 'select Date, Processed, LAG(Processed) over (order by Date) as Previous, (Processed-Previous) as Delta from test order by Date desc'
Date Processed Previous Delta
2021-04-15 300 275 25
2021-04-14 275 NULL NULL
@marcusolsson
Copy link
Contributor

Thank you for the feature request! I think this could be really useful in giving users more control over the data returned.

@HenrikRolandHansen
Copy link

This would be a nice feature instead of using filtering as suggested in #116. adding support for using variables with csvq would be handy as well.

@grafana grafana locked and limited conversation to collaborators Mar 7, 2022
@marcusolsson marcusolsson converted this issue into discussion #177 Mar 7, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
type/feature-request Requested new feature or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants