Skip to content

Commit 8da6ae2

Browse files
committed
Small update to ensure s3_output consistency on athena.read_sql_query
1 parent 51adc9e commit 8da6ae2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

awswrangler/athena.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,10 +419,10 @@ def read_sql_query( # pylint: disable=too-many-branches,too-many-locals
419419
_s3_output = wg_s3_output
420420
else:
421421
_s3_output = s3_output
422+
_s3_output = _s3_output[:-1] if _s3_output[-1] == "/" else _s3_output
422423
name: str = ""
423424
if ctas_approach is True:
424425
name = f"temp_table_{pa.compat.guid()}"
425-
_s3_output = _s3_output[:-1] if _s3_output[-1] == "/" else _s3_output
426426
path: str = f"{_s3_output}/{name}"
427427
sql = (
428428
f"CREATE TABLE {name}\n"

0 commit comments

Comments
 (0)