Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions airbyte_cdk/sources/declarative/concurrent_declarative_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def _group_streams(
# so we need to treat them as synchronous
if (
isinstance(declarative_stream, DeclarativeStream)
and name_to_stream_mapping[declarative_stream.name].get("retriever")["type"]
and name_to_stream_mapping[declarative_stream.name]["retriever"]["type"]
Comment thread
aaronsteers marked this conversation as resolved.
== "SimpleRetriever"
):
incremental_sync_component_definition = name_to_stream_mapping[
Expand All @@ -215,7 +215,7 @@ def _group_streams(

partition_router_component_definition = (
name_to_stream_mapping[declarative_stream.name]
.get("retriever")
.get("retriever", {})
.get("partition_router")
Comment thread
aaronsteers marked this conversation as resolved.
)
is_without_partition_router_or_cursor = not bool(
Expand All @@ -237,7 +237,7 @@ def _group_streams(
cursor = self._constructor.create_concurrent_cursor_from_datetime_based_cursor(
state_manager=state_manager,
model_type=DatetimeBasedCursorModel,
component_definition=incremental_sync_component_definition,
component_definition=incremental_sync_component_definition, # type: ignore # Not None because of the if condition above
Comment thread
aaronsteers marked this conversation as resolved.
stream_name=declarative_stream.name,
stream_namespace=declarative_stream.namespace,
config=config or {},
Expand Down Expand Up @@ -320,10 +320,11 @@ def _group_streams(
def _is_datetime_incremental_without_partition_routing(
self,
declarative_stream: DeclarativeStream,
incremental_sync_component_definition: Mapping[str, Any],
incremental_sync_component_definition: Mapping[str, Any] | None,
) -> bool:
return (
bool(incremental_sync_component_definition)
incremental_sync_component_definition is not None
and bool(incremental_sync_component_definition)
Comment thread
aaronsteers marked this conversation as resolved.
and incremental_sync_component_definition.get("type", "")
== DatetimeBasedCursorModel.__name__
and self._stream_supports_concurrent_partition_processing(
Expand Down