diff --git a/providers/src/airflow/providers/apache/spark/hooks/spark_sql.py b/providers/src/airflow/providers/apache/spark/hooks/spark_sql.py index 688a91cb5b17c..f31dcbaaa27cd 100644 --- a/providers/src/airflow/providers/apache/spark/hooks/spark_sql.py +++ b/providers/src/airflow/providers/apache/spark/hooks/spark_sql.py @@ -145,8 +145,8 @@ def _prepare_command(self, cmd: str | list[str]) -> list[str]: if self._conf: conf = self._conf if isinstance(conf, dict): - for key in conf: - connection_cmd += ["--conf", f"{key}={conf[key]}"] + for key, value in conf.items(): + connection_cmd += ["--conf", f"{key}={value}"] elif isinstance(conf, str): for conf_el in conf.split(","): connection_cmd += ["--conf", conf_el]