val db = "database_name"
spark.sessionState.catalog.listTables(db).map(table=>spark.sessionState.catalog.externalCatalog.getTable(table.database.get,table.table)).filter(x=>x.provider.toString().toLowerCase.contains("delta"))
The above code snippet will give the name of all the Delta tables in a database. If the intention is to create a dashboard, then
- iterate over all the databases
- identify the Delta tables
- Call the "DESCRIBE HISTORY" command on each of the delta tables
- The details of all the tables and row count can be stored in a Delta table.
- Dashboard can query the delta table used to store these details in #4