diff --git a/airbyte_cdk/sources/declarative/extractors/record_selector.py b/airbyte_cdk/sources/declarative/extractors/record_selector.py index 3561f107..0bc17086 100644 --- a/airbyte_cdk/sources/declarative/extractors/record_selector.py +++ b/airbyte_cdk/sources/declarative/extractors/record_selector.py @@ -92,7 +92,7 @@ def select_records( all_data: Iterable[Mapping[str, Any]] = self.extractor.extract_records(response) response_root_iterator = self.response_root_extractor.extract_records(response) - stream_state.update({STREAM_SLICE_RESPONSE_ROOT_KEY: next(response_root_iterator, None)}) + stream_state.update({STREAM_SLICE_RESPONSE_ROOT_KEY: next(iter(response_root_iterator), None)}) try: yield from self.filter_and_transform( all_data, stream_state, records_schema, stream_slice, next_page_token