Condividi tramite


current_schema

Restituisce il database corrente.

Sintassi

from pyspark.sql import functions as sf

sf.current_schema()

Esempi

Esempio 1: Ottenere lo schema corrente

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