druid-io / pydruid

A Python connector for Druid
Other
505 stars 194 forks source link

Querying list of data sources #306

Open RelativisticMechanic opened 1 year ago

RelativisticMechanic commented 1 year ago

Hello,

Is there any way that I can get a list of data sources currently active on a Druid server? I want my client to be able to type a phrase or word that is part of the data source name and it'll show the available data sources that match said phrases / words.

Is there a way to do that?

suneet-s commented 1 year ago

This information is available in the INFORMATION_SCHEMA. You can query it via the query API. The datasources live under the TABLE_SCHEMA druid

SELECT * FROM "INFORMATION_SCHEMA"."TABLES" WHERE "TABLE_SCHEMA" = 'druid'
RelativisticMechanic commented 1 year ago

Perfect. Thanks a lot for the answer! Please mark it as solved.