pyspark.sql.Catalog.listDatabases

Catalog.listDatabases() → List[pyspark.sql.catalog.Database][source]

Returns a list of databases available across all sessions.

New in version 2.0.0.

Returns
list

A list of Database.

Examples

>>> spark.catalog.listDatabases()
[Database(name='default', catalog='spark_catalog', description='default database', ...