Skip to main content

SparkStorageConf

The fs.azure.* keys of spark_storage_conf(), as a plain dict[str, str].

Usage

Source

SparkStorageConf()

The dict holds the real values, to pass to SparkSession.builder.config(map=conf) or spark.conf.set(); repr() and str() show <redacted> for the client secret, refresh token and account key, so printing one in a notebook does not leak them. copy() and | keep the type, and so the redaction.

Examples

conf = spark_storage_conf(refresh_token=refresh_token_from_az_cli())
conf  # SparkStorageConf({..., 'spark.hadoop.fs.azure.account.oauth2.refresh.token': '<redacted>', ...})
for key, value in conf.items():
    spark.conf.set(key, value)

Methods

Name Description
copy() A shallow copy, still a SparkStorageConf.

copy()

A shallow copy, still a SparkStorageConf.

Usage

Source

copy()