From 47b928637d6aabc354ec5775f507e8a03c5d12f7 Mon Sep 17 00:00:00 2001 From: Nils Date: Wed, 25 Sep 2024 18:45:22 -0700 Subject: [PATCH] Update storage_options when using DeltaTable in write_deltalake --- python/deltalake/writer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/deltalake/writer.py b/python/deltalake/writer.py index 535a6e7a13..f44044733a 100644 --- a/python/deltalake/writer.py +++ b/python/deltalake/writer.py @@ -297,8 +297,8 @@ def write_deltalake( table, table_uri = try_get_table_and_table_uri(table_or_uri, storage_options) if table is not None: - storage_options = table._storage_options or {} - storage_options.update(storage_options or {}) + if table._storage_options and storage_options: + table._storage_options.update(storage_options) table.update_incremental() _enforce_append_only(table=table, configuration=configuration, mode=mode)