Is there any good way to support write sql statement to database based on user customized data in "Text" panel?

as I know, for either graph or table panel in plugins, it is mainly used to support to extract data from database and then show them in graph or table, from panel’s setting, there is metric setting with sql statement.

if there is requirement to write user customized info from “Text” panel to database configured in datasource using grafana’s sql statement editor capability? is there any good way to achieve it? per my understanding, now sql statement communication engine is ready between grafana and user customized database, how to reuse this capability to achieve “control” purpose and not only presentation? thank you very much!

Hi,

The SQL data sources purpose is solely for querying data to visualize. At least at the moment. I wouldn’t recommend to try and build something custom around that. What I would recommend is to integrate to a rest api instead if you really want to use Grafana for inserting/updating data.

Ryan showed in his GrafanaCon talk that they’d built some custom configuration pages in Grafana and maybe can inspire you: https://www.youtube.com/watch?v=I3o3tnj5j6s&list=PLDGkOdUX1UjpXR6BexaDoOIc0ksE2MzFI&index=13&t=0s

Marcus