mancubus77 commented on issue #2686:
URL: https://github.com/apache/superset/issues/2686#issuecomment-898493711
For people who wants connect superset with Prom and other TSDBs. It's
possible with Trino/Starburst.
```
trino> PREPARE my_select1 FROM SELECT * FROM
prometheus.default.prometheus_sd_updates_total;
PREPARE
trino> DESCRIBE OUTPUT my_select1;
Column Name | Catalog | Schema | Table |
Type | Type Size | Aliased
-------------+------------+---------+-----------------------------+-----------------------------+-----------+---------
labels | prometheus | default | prometheus_sd_updates_total |
map(varchar, varchar) | 0 | false
timestamp | prometheus | default | prometheus_sd_updates_total |
timestamp(3) with time zone | 8 | false
value | prometheus | default | prometheus_sd_updates_total | double
| 8 | false
(3 rows)
```
Unfortunately PromQL won't be available and you might need to use presto
SQL, for example:
```
trino> SELECT count(element_at(labels, 'code')) FROM
prometheus.default.prometheus_http_requests_total where element_at(labels,
'code') = '200';
_col0
-------
671
(1 row)
```
this SQL above count all label `code=200` from
`prometheus_http_requests_total` metric
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]