3 ms·
Sure, the plugin is built on top of Scenes https://grafana.com/developers/scenes https://grafana.com/developers/scenes Add all of your required data sources wi
by rorycrispin 3y ago
Sure, the plugin is built on top of Scenes https://grafana.com/developers/scenes https://grafana.com/developers/scenes
Add all of your required data sources will well known UIDs https://grafana.com/docs/grafana/latest/administration/provisioning/ https://grafana.com/docs/grafana/latest/administration/provi...
Then you can create a query panel and update the state with the desired query SQL and data source ID like so;
const logsQuery = new SceneQueryRunner({queries: []});
logsQuery.setState({
datasource: { uid: dataSourceID},
queries: [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": dataSourceID,
},
"queryType": "sql",
"rawSql": logsQuerySQL,
...
],
});