builder.
config
Sets a config option. Options set using this method are automatically propagated to both SparkConf and SparkSession’s own configuration.
SparkConf
SparkSession
New in version 2.0.0.
a key name string for configuration property
a value for configuration property
an instance of SparkConf
Examples
For an existing SparkConf, use conf parameter.
>>> from pyspark.conf import SparkConf >>> SparkSession.builder.config(conf=SparkConf()) <pyspark.sql.session...
For a (key, value) pair, you can omit parameter names.
>>> SparkSession.builder.config("spark.some.config.option", "some-value") <pyspark.sql.session...