Skip to main content

create (SparkSession.Builder)

Creates a new SparkSession. This method sets this session as the default or active session.

Alternatively, use getOrCreate to check for and use an existing session before creating a new one.

Syntax​

create()

Returns​

SparkSession

Examples​

Python
spark = SparkSession.builder.config("k1", "v1").create()