pyspark.sql.functions.current_schema# pyspark.sql.functions.current_schema()[source]# Returns the current database. New in version 3.5.0. See also pyspark.sql.functions.current_catalog() pyspark.sql.functions.current_database() Examples >>> import pyspark.sql.functions as sf >>> spark.range(1).select(sf.current_schema()).show() +----------------+ |current_schema()| +----------------+ | default| +----------------+