Catalog.
currentDatabase
Returns the current default database in this session.
New in version 2.0.0.
The current default database name.
Examples
>>> spark.catalog.currentDatabase() 'default'