pyspark.sql.SparkSession.active#
- classmethod SparkSession.active()[source]#
Returns the active or default
SparkSessionfor the current thread, returned by the builder.Added in version 3.5.0.
- Returns:
SparkSessionSpark session if an active or default session exists for the current thread.