メインコンテンツまでスキップ

現在のスキーマ

現在のデータベースを返します。

構文

Python
from pyspark.sql import functions as sf

sf.current_schema()

例1 : 現在のスキーマを取得する

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