pyspark.sql.functions.
current_database
Returns the current database.
New in version 3.5.0.
Examples
>>> spark.range(1).select(current_database()).show() +------------------+ |current_database()| +------------------+ | default| +------------------+
previous
pyspark.sql.functions.current_catalog
next
pyspark.sql.functions.current_schema