Skip to content

Commit 0d0e78d

Browse files
fix: reverse introduced breaking change in _create_table (#2711)
Co-authored-by: Leon Luttenberger <[email protected]>
1 parent 41a8db2 commit 0d0e78d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

awswrangler/catalog/_create.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,13 @@ def _create_table( # noqa: PLR0912,PLR0915
143143
DatabaseName=database,
144144
TableInput=table_input,
145145
)
146-
if table_exist and mode in ("overwrite", "update"):
146+
if table_exist:
147147
_logger.debug("Updating table (%s)...", mode)
148148
args["SkipArchive"] = skip_archive
149149
if mode == "overwrite":
150150
delete_all_partitions(table=table, database=database, catalog_id=catalog_id, boto3_session=boto3_session)
151-
client_glue.update_table(**args)
151+
if mode in ["overwrite", "update"]:
152+
client_glue.update_table(**args)
152153
else:
153154
try:
154155
_logger.debug("Creating table (%s)...", mode)

0 commit comments

Comments
 (0)