---
title: set
description: "RuntimeConfig.set method in PySpark: Sets the given Spark runtime configuration property."
canonical_url: https://docs.databricks.com/gcp/en/pyspark/reference/classes/runtimeconfig/set
---

# set

Sets the given Spark runtime configuration property.

## Syntax

```
set(key: str, value: str | int | bool)
```

## Parameters

| Parameter | Type              | Description                        |
| --------- | ----------------- | ---------------------------------- |
| `key`     | str               | Key of the configuration to set.   |
| `value`   | str, int, or bool | Value of the configuration to set. |

## Examples

```python
spark.conf.set("key1", "value1")
```
