Skip to main content

current_catalog

Returns the current catalog.

Syntax

Python
from pyspark.sql import functions as sf

sf.current_catalog()

Examples

Example 1: Get current catalog

Python
from pyspark.sql import functions as sf
spark.range(1).select(sf.current_catalog()).show()
Output
+-----------------+
|current_catalog()|
+-----------------+
| spark_catalog|
+-----------------+