หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Returns the active SparkSession for the current thread, returned by the builder.
Syntax
SparkSession.getActiveSession()
Returns
SparkSession or None
Examples
s = SparkSession.getActiveSession()
df = s.createDataFrame([('Alice', 1)], ['name', 'age'])
df.select("age").show()
# +---+
# |age|
# +---+
# | 1|
# +---+