pyspark.sql.Catalog.currentDatabase

Catalog.currentDatabase() → str[source]

Returns the current default database in this session.

New in version 2.0.0.

Returns
str

The current default database name.

Examples

>>> spark.catalog.currentDatabase()
'default'