issue-5757: s3-prefix-fix-added (#5876)

* issue-5757: s3-prefix-fix-added

* updated-f-string-in-prefix
This commit is contained in:
Abhishek Pandey 2022-07-06 20:06:34 +05:30 committed by GitHub
parent c4d71adc5e
commit f3a6a405b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,7 +170,7 @@ class DatalakeSource(Source[Entity]):
def get_s3_files(self, bucket_name, prefix):
kwargs = {"Bucket": bucket_name}
if prefix:
kwargs["prefix"] = prefix
kwargs["Prefix"] = prefix if prefix.endswith("/") else f"{prefix}/"
for key in self.client.list_objects(**kwargs)["Contents"]:
try:
if filter_by_table(