2323 ConfiguredAirbyteCatalog ,
2424 TraceType ,
2525)
26- from airbyte_cdk .sources .declarative .declarative_source import DeclarativeSource
26+ from airbyte_cdk .sources .declarative .concurrent_declarative_source import (
27+ ConcurrentDeclarativeSource ,
28+ )
2729from airbyte_cdk .utils import AirbyteTracedException
2830from airbyte_cdk .utils .datetime_format_inferrer import DatetimeFormatInferrer
2931from airbyte_cdk .utils .schema_inferrer import (
@@ -55,7 +57,7 @@ class TestReader:
5557 that contains slices of data, log messages, auxiliary requests, and any inferred schema or datetime formats.
5658
5759 Parameters:
58- source (DeclarativeSource ): The data source to read from.
60+ source (ConcurrentDeclarativeSource ): The data source to read from.
5961 config (Mapping[str, Any]): Configuration parameters for the source.
6062 configured_catalog (ConfiguredAirbyteCatalog): Catalog containing stream configuration.
6163 state (List[AirbyteStateMessage]): Current state information for the read.
@@ -83,7 +85,7 @@ def __init__(
8385
8486 def run_test_read (
8587 self ,
86- source : DeclarativeSource ,
88+ source : ConcurrentDeclarativeSource [ Optional [ List [ AirbyteStateMessage ]]] ,
8789 config : Mapping [str , Any ],
8890 configured_catalog : ConfiguredAirbyteCatalog ,
8991 stream_name : str ,
@@ -94,7 +96,7 @@ def run_test_read(
9496 Run a test read for the connector by reading from a single stream and inferring schema and datetime formats.
9597
9698 Parameters:
97- source (DeclarativeSource ): The source instance providing the streams.
99+ source (ConcurrentDeclarativeSource ): The source instance providing the streams.
98100 config (Mapping[str, Any]): The configuration settings to use for reading.
99101 configured_catalog (ConfiguredAirbyteCatalog): The catalog specifying the stream configuration.
100102 state (List[AirbyteStateMessage]): A list of state messages to resume the read.
@@ -377,13 +379,13 @@ def _get_latest_config_update(
377379
378380 def _read_stream (
379381 self ,
380- source : DeclarativeSource ,
382+ source : ConcurrentDeclarativeSource [ Optional [ List [ AirbyteStateMessage ]]] ,
381383 config : Mapping [str , Any ],
382384 configured_catalog : ConfiguredAirbyteCatalog ,
383385 state : List [AirbyteStateMessage ],
384386 ) -> Iterator [AirbyteMessage ]:
385387 """
386- Reads messages from the given DeclarativeSource using an AirbyteEntrypoint.
388+ Reads messages from the given ConcurrentDeclarativeSource using an AirbyteEntrypoint.
387389
388390 This method attempts to yield messages from the source's read generator. If the generator
389391 raises an AirbyteTracedException, it checks whether the exception message indicates a non-actionable
@@ -392,7 +394,7 @@ def _read_stream(
392394 wrapped into an AirbyteTracedException, and yielded as an AirbyteMessage.
393395
394396 Parameters:
395- source (DeclarativeSource ): The source object that provides data reading logic.
397+ source (ConcurrentDeclarativeSource ): The source object that provides data reading logic.
396398 config (Mapping[str, Any]): The configuration dictionary for the source.
397399 configured_catalog (ConfiguredAirbyteCatalog): The catalog defining the streams and their configurations.
398400 state (List[AirbyteStateMessage]): A list representing the current state for incremental sync.
0 commit comments