Skip to content

Commit

Permalink
Updated implementation of “overwrite_files” mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pvieito committed Jan 17, 2025
1 parent 10e30c1 commit 2f31d7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions awswrangler/s3/_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def _validate_args(
if mode == "overwrite_files" and (max_rows_by_file or bucketing_info):
raise exceptions.InvalidArgumentValue(
"When mode is set to 'overwrite_files', the "
"`max_rows_by_file` and `bucketing_info` arguments cannot be set.")
"`max_rows_by_file` and `bucketing_info` arguments cannot be set."
)
if any(arg is not None for arg in (table, description, parameters, columns_comments, columns_parameters)):
raise exceptions.InvalidArgumentCombination(
"Please pass dataset=True to be able to use any one of these "
Expand Down Expand Up @@ -298,8 +299,7 @@ def write( # noqa: PLR0913
dtype = dtype if dtype else {}
partitions_values: dict[str, list[str]] = {}

mode, filename_prefix = _compose_filename_prefix_for_mode(
mode=mode, filename_prefix=filename_prefix)
mode, filename_prefix = _compose_filename_prefix_for_mode(mode=mode, filename_prefix=filename_prefix)
mode = "append" if mode is None else mode
cpus: int = _utils.ensure_cpu_count(use_threads=use_threads)
s3_client = _utils.client(service_name="s3", session=boto3_session)
Expand Down

0 comments on commit 2f31d7d

Please sign in to comment.