Kopīgot, izmantojot


current_schema

Returns the current database.

Syntax

from pyspark.sql import functions as sf

sf.current_schema()

Examples

Example 1: Get current schema

from pyspark.sql import functions as sf
spark.range(1).select(sf.current_schema()).show()
+----------------+
|current_schema()|
+----------------+
|         default|
+----------------+