Catalog.
getDatabase
Get the database with the specified name. This throws an AnalysisException when the database cannot be found.
AnalysisException
New in version 3.4.0.
name of the database to get.
Database
The database found by the name.
Examples
>>> spark.catalog.getDatabase("default") Database(name='default', catalog='spark_catalog', description='default database', ...
Using the fully qualified name with the catalog name.
>>> spark.catalog.getDatabase("spark_catalog.default") Database(name='default', catalog='spark_catalog', description='default database', ...