Skip to content

Commit 3c8afae

Browse files
authored
Ensure the table path read by 'read_parquet_table()' ends with "/". (#648)
1 parent 6ae6235 commit 3c8afae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

awswrangler/s3/_read_parquet.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,8 @@ def read_parquet_table(
771771
args["CatalogId"] = catalog_id
772772
res: Dict[str, Any] = client_glue.get_table(**args)
773773
try:
774-
path: str = res["Table"]["StorageDescriptor"]["Location"]
774+
location: str = res["Table"]["StorageDescriptor"]["Location"]
775+
path: str = location if location.endswith("/") else f"{location}/"
775776
except KeyError as ex:
776777
raise exceptions.InvalidTable(f"Missing s3 location for {database}.{table}.") from ex
777778
df = read_parquet(

0 commit comments

Comments
 (0)