Skip to content

Commit

Permalink
fix: reverse introduced breaking change in _create_table (#2711)
Browse files Browse the repository at this point in the history
Co-authored-by: Leon Luttenberger <LeonLuttenberger@users.noreply.github.com>
  • Loading branch information
jaidisido and LeonLuttenberger authored Mar 7, 2024
1 parent 41a8db2 commit 0d0e78d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions awswrangler/catalog/_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,13 @@ def _create_table( # noqa: PLR0912,PLR0915
DatabaseName=database,
TableInput=table_input,
)
if table_exist and mode in ("overwrite", "update"):
if table_exist:
_logger.debug("Updating table (%s)...", mode)
args["SkipArchive"] = skip_archive
if mode == "overwrite":
delete_all_partitions(table=table, database=database, catalog_id=catalog_id, boto3_session=boto3_session)
client_glue.update_table(**args)
if mode in ["overwrite", "update"]:
client_glue.update_table(**args)
else:
try:
_logger.debug("Creating table (%s)...", mode)
Expand Down

0 comments on commit 0d0e78d

Please sign in to comment.