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

Feature Request: Support for table to dataframe Grafana format to Enable transformations? #404

Open
toni-moreno opened this issue Jan 7, 2022 · 1 comment
Assignees
Milestone

Comments

@toni-moreno
Copy link

I've found could be useful to have data tables as dataframes in Grafana.

by example in this case could be fine if we can transform this table.

┌─t─┬─cat─┬─errors─┐
│ 1 │   3 │     24 │
│ 1 │   4 │     84 │
└───┴─────┴────────┘

in this other ( grafana dataframe ready to handle transformations) .

+---------------------+-----------------+-----------------+
| Name: time          | Name: errors    | Name: errors    |
| Labels:             | Labels: cat=3   | Labels: cat=4   |
| Type: []time.Time   | Type: []float64 | Type: []float64 |
+---------------------+-----------------+-----------------+
| 1                   | 24              | 84              |
+---------------------+-----------------+-----------------+

 I'm newbie in clickhouse, but after some days working with clickhouse  plugin 2.3.2 data and grafana 7.5.5 , I didn't found any solution for this.
There is any way to do that?  (special column naming may be?) 

Thank you very much for your patience
@Slach
Copy link
Collaborator

Slach commented Apr 1, 2024

need to create ./docker/grafana/dashboards/issue_404_tranformation_table.json
where
table default.test_grafana

SELECT service, count() AS value 
FROM $table

or

$columns(service, count() AS value) 
FROM $table

format As Table
and use transformation to transpose rows to columns in Grafana

@Slach Slach modified the milestones: 3.1.0, 3.2.0 Apr 1, 2024
@Slach Slach modified the milestones: 3.2.0, 3.3.0 Jun 20, 2024
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

3 participants