pyspark.sql.SparkSession.newSession#
- SparkSession.newSession()[source]#
- Returns a new - SparkSessionas new session, that has separate SQLConf, registered temporary views and UDFs, but shared- SparkContextand table cache.- New in version 2.0.0. - Returns
- SparkSession
- Spark session if an active session exists for the current thread 
 
 - Examples - >>> spark.newSession() <...SparkSession object ...>