show datasources

show datasources 命令用于查询 PPL 引擎中配置的数据源。该命令只能作为 PPL 查询中的第一个命令使用。

要使用 show datasources 命令,必须将 plugins.calcite.enabled 设置为 false

语法

show datasources 命令的语法如下:

show datasources

show datasources 命令不接受任何参数。

示例 1:获取所有 Prometheus 数据源

以下查询获取所有 Prometheus 数据源:

show datasources
| where CONNECTOR_TYPE='PROMETHEUS'

该查询返回以下结果:

DATASOURCE_NAME CONNECTOR_TYPE
my_prometheus PROMETHEUS