We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ed588e commit 7ae7adcCopy full SHA for 7ae7adc
awswrangler/s3/_read.py
@@ -265,6 +265,10 @@ def read_table_metadata(
265
ignore_empty=ignore_empty,
266
s3_additional_kwargs=s3_additional_kwargs,
267
)
268
+
269
+ if len(paths) < 1:
270
+ raise exceptions.NoFilesFound(f"No files Found: {path}.")
271
272
version_ids = _check_version_id(paths=paths, version_id=version_id)
273
274
# Files
tests/unit/test_s3_parquet.py
@@ -57,6 +57,11 @@ def test_read_parquet_metadata_nulls(path):
57
assert columns_types.get("c2") == "string"
58
59
60
+def test_read_parquet_metadata_nonexistent_file(path):
61
+ with pytest.raises(wr.exceptions.NoFilesFound):
62
+ wr.s3.read_parquet_metadata(path + "non-existent-file.parquet")
63
64
65
@pytest.mark.parametrize(
66
"partition_cols",
67
[
0 commit comments