Skip to content

Commit 1a5a2c4

Browse files
pawel99kPaweł Koźmińskiwookasz
authored
[BUGFIX] Enable reading multiple pages of S3 directory by popping ContinuationToken from query_options once it is used in a S3 request (great-expectations#11361)
Co-authored-by: Paweł Koźmiński <pawel.kozminski@ing.com> Co-authored-by: Lukasz Lempart <llempart@gmail.com>
1 parent 1b555ce commit 1a5a2c4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

great_expectations/datasource/fluent/data_connector/s3_data_connector.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ def list_s3_keys( # noqa: C901 # too complex
246246
logger.debug(f"Fetching objects from S3 with query options: {query_options}")
247247

248248
s3_objects_info: dict = s3.list_objects_v2(**query_options)
249+
query_options.pop("ContinuationToken", None)
249250

250251
if not any(key in s3_objects_info for key in ["Contents", "CommonPrefixes"]):
251252
raise ValueError("S3 query may not have been configured correctly.") # noqa: TRY003 # FIXME CoP

0 commit comments

Comments
 (0)