airbyte-cdk 6.6.8.dev0__py3-none-any.whl → 6.6.8rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airbyte_cdk/sources/declarative/concurrent_declarative_source.py +56 -2
- airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +4 -0
- {airbyte_cdk-6.6.8.dev0.dist-info → airbyte_cdk-6.6.8rc1.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.6.8.dev0.dist-info → airbyte_cdk-6.6.8rc1.dist-info}/RECORD +7 -7
- {airbyte_cdk-6.6.8.dev0.dist-info → airbyte_cdk-6.6.8rc1.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.6.8.dev0.dist-info → airbyte_cdk-6.6.8rc1.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.6.8.dev0.dist-info → airbyte_cdk-6.6.8rc1.dist-info}/entry_points.txt +0 -0
@@ -24,8 +24,6 @@ from airbyte_cdk.sources.declarative.interpolation import InterpolatedString
|
|
24
24
|
from airbyte_cdk.sources.declarative.manifest_declarative_source import ManifestDeclarativeSource
|
25
25
|
from airbyte_cdk.sources.declarative.models.declarative_component_schema import (
|
26
26
|
ConcurrencyLevel as ConcurrencyLevelModel,
|
27
|
-
)
|
28
|
-
from airbyte_cdk.sources.declarative.models.declarative_component_schema import (
|
29
27
|
DatetimeBasedCursor as DatetimeBasedCursorModel,
|
30
28
|
DeclarativeStream as DeclarativeStreamModel,
|
31
29
|
)
|
@@ -48,6 +46,7 @@ from airbyte_cdk.sources.streams.concurrent.abstract_stream import AbstractStrea
|
|
48
46
|
from airbyte_cdk.sources.streams.concurrent.availability_strategy import (
|
49
47
|
AlwaysAvailableAvailabilityStrategy,
|
50
48
|
)
|
49
|
+
from airbyte_cdk.sources.streams.concurrent.cursor import FinalStateCursor
|
51
50
|
from airbyte_cdk.sources.streams.concurrent.default_stream import DefaultStream
|
52
51
|
from airbyte_cdk.sources.streams.concurrent.helpers import get_primary_key_from_stream
|
53
52
|
|
@@ -67,6 +66,15 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
|
|
67
66
|
component_factory: Optional[ModelToComponentFactory] = None,
|
68
67
|
**kwargs: Any,
|
69
68
|
) -> None:
|
69
|
+
# To reduce the complexity of the concurrent framework, we are not enabling RFR with synthetic
|
70
|
+
# cursors. We do this by no longer automatically instantiating RFR cursors when converting
|
71
|
+
# the declarative models into runtime components. Concurrent sources will continue to checkpoint
|
72
|
+
# incremental streams running in full refresh.
|
73
|
+
component_factory = component_factory or ModelToComponentFactory(
|
74
|
+
emit_connector_builder_messages=emit_connector_builder_messages,
|
75
|
+
disable_resumable_full_refresh=True,
|
76
|
+
)
|
77
|
+
|
70
78
|
super().__init__(
|
71
79
|
source_config=source_config,
|
72
80
|
debug=debug,
|
@@ -193,6 +201,17 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
|
|
193
201
|
declarative_stream.name
|
194
202
|
].get("incremental_sync")
|
195
203
|
|
204
|
+
partition_router_component_definition = (
|
205
|
+
name_to_stream_mapping[declarative_stream.name]
|
206
|
+
.get("retriever")
|
207
|
+
.get("partition_router")
|
208
|
+
)
|
209
|
+
|
210
|
+
is_substream_without_incremental = (
|
211
|
+
partition_router_component_definition
|
212
|
+
and not datetime_based_cursor_component_definition
|
213
|
+
)
|
214
|
+
|
196
215
|
if (
|
197
216
|
datetime_based_cursor_component_definition
|
198
217
|
and datetime_based_cursor_component_definition.get("type", "")
|
@@ -245,6 +264,41 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
|
|
245
264
|
cursor=cursor,
|
246
265
|
)
|
247
266
|
)
|
267
|
+
elif is_substream_without_incremental and hasattr(
|
268
|
+
declarative_stream.retriever, "stream_slicer"
|
269
|
+
):
|
270
|
+
partition_generator = StreamSlicerPartitionGenerator(
|
271
|
+
DeclarativePartitionFactory(
|
272
|
+
declarative_stream.name,
|
273
|
+
declarative_stream.get_json_schema(),
|
274
|
+
self._retriever_factory(
|
275
|
+
name_to_stream_mapping[declarative_stream.name],
|
276
|
+
config,
|
277
|
+
{},
|
278
|
+
),
|
279
|
+
self.message_repository,
|
280
|
+
),
|
281
|
+
declarative_stream.retriever.stream_slicer,
|
282
|
+
)
|
283
|
+
|
284
|
+
cursor = FinalStateCursor(
|
285
|
+
stream_name=declarative_stream.name,
|
286
|
+
stream_namespace=declarative_stream.namespace,
|
287
|
+
message_repository=self.message_repository,
|
288
|
+
)
|
289
|
+
|
290
|
+
concurrent_streams.append(
|
291
|
+
DefaultStream(
|
292
|
+
partition_generator=partition_generator,
|
293
|
+
name=declarative_stream.name,
|
294
|
+
json_schema=declarative_stream.get_json_schema(),
|
295
|
+
availability_strategy=AlwaysAvailableAvailabilityStrategy(),
|
296
|
+
primary_key=get_primary_key_from_stream(declarative_stream.primary_key),
|
297
|
+
cursor_field=None,
|
298
|
+
logger=self.logger,
|
299
|
+
cursor=cursor,
|
300
|
+
)
|
301
|
+
)
|
248
302
|
else:
|
249
303
|
synchronous_streams.append(declarative_stream)
|
250
304
|
else:
|
@@ -383,6 +383,7 @@ class ModelToComponentFactory:
|
|
383
383
|
emit_connector_builder_messages: bool = False,
|
384
384
|
disable_retries: bool = False,
|
385
385
|
disable_cache: bool = False,
|
386
|
+
disable_resumable_full_refresh: bool = False,
|
386
387
|
message_repository: Optional[MessageRepository] = None,
|
387
388
|
):
|
388
389
|
self._init_mappings()
|
@@ -391,6 +392,7 @@ class ModelToComponentFactory:
|
|
391
392
|
self._emit_connector_builder_messages = emit_connector_builder_messages
|
392
393
|
self._disable_retries = disable_retries
|
393
394
|
self._disable_cache = disable_cache
|
395
|
+
self._disable_resumable_full_refresh = disable_resumable_full_refresh
|
394
396
|
self._message_repository = message_repository or InMemoryMessageRepository( # type: ignore
|
395
397
|
self._evaluate_log_level(emit_connector_builder_messages)
|
396
398
|
)
|
@@ -1334,6 +1336,8 @@ class ModelToComponentFactory:
|
|
1334
1336
|
if model.incremental_sync
|
1335
1337
|
else None
|
1336
1338
|
)
|
1339
|
+
elif self._disable_resumable_full_refresh:
|
1340
|
+
return stream_slicer
|
1337
1341
|
elif stream_slicer:
|
1338
1342
|
# For the Full-Refresh sub-streams, we use the nested `ChildPartitionResumableFullRefreshCursor`
|
1339
1343
|
return PerPartitionCursor(
|
@@ -62,7 +62,7 @@ airbyte_cdk/sources/declarative/checks/check_stream.py,sha256=dAA-UhmMj0WLXCkRQr
|
|
62
62
|
airbyte_cdk/sources/declarative/checks/connection_checker.py,sha256=MBRJo6WJlZQHpIfOGaNOkkHUmgUl_4wDM6VPo41z5Ss,1383
|
63
63
|
airbyte_cdk/sources/declarative/concurrency_level/__init__.py,sha256=5XUqrmlstYlMM0j6crktlKQwALek0uiz2D3WdM46MyA,191
|
64
64
|
airbyte_cdk/sources/declarative/concurrency_level/concurrency_level.py,sha256=YIwCTCpOr_QSNW4ltQK0yUGWInI8PKNY216HOOegYLk,2101
|
65
|
-
airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=
|
65
|
+
airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=C3T-xJYl8SmaxXhMTVTK4gkuDznpOfkAkMYorexSIGg,22474
|
66
66
|
airbyte_cdk/sources/declarative/datetime/__init__.py,sha256=l9LG7Qm6e5r_qgqfVKnx3mXYtg1I9MmMjomVIPfU4XA,177
|
67
67
|
airbyte_cdk/sources/declarative/datetime/datetime_parser.py,sha256=SX9JjdesN1edN2WVUVMzU_ptqp2QB1OnsnjZ4mwcX7w,2579
|
68
68
|
airbyte_cdk/sources/declarative/datetime/min_max_datetime.py,sha256=8VZJP18eJLabSPP1XBSPDaagUBG6q1ynIiPJy3rE2mc,5344
|
@@ -109,7 +109,7 @@ airbyte_cdk/sources/declarative/parsers/__init__.py,sha256=ZnqYNxHsKCgO38IwB34RQ
|
|
109
109
|
airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=Rir9_z3Kcd5Es0-LChrzk-0qubAsiK_RSEnLmK2OXm8,553
|
110
110
|
airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=jVZ3ZV5YZrmDNIX5cM2mugXmnbH27zHRcD22_3oatpo,8454
|
111
111
|
airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py,sha256=IWUOdF03o-aQn0Occo1BJCxU0Pz-QILk5L67nzw2thw,6803
|
112
|
-
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=
|
112
|
+
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=WybQH-a4JACXk2L0Z5quylo-dmrEkDH7zfFEtN4O688,95619
|
113
113
|
airbyte_cdk/sources/declarative/partition_routers/__init__.py,sha256=8uGos2u7TFTx_EJBdcjdUGn3Eyx6jUuEa1_VB8UP_dI,631
|
114
114
|
airbyte_cdk/sources/declarative/partition_routers/cartesian_product_stream_slicer.py,sha256=c5cuVFM6NFkuQqG8Z5IwkBuwDrvXZN1CunUOM_L0ezg,6892
|
115
115
|
airbyte_cdk/sources/declarative/partition_routers/list_partition_router.py,sha256=t7pRdFWfFWJtQQG19c9PVeMODyO2BknRTakpM5U9N-8,4844
|
@@ -331,8 +331,8 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EemcgcQlI8-LPYOPlYv4Qkdjyho79XVLWaUHF5X
|
|
331
331
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=LVc9KbtMeV_z99jWo0Ou8u4l6eBJ0BWNhxj4zrrGKRs,763
|
332
332
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
333
333
|
airbyte_cdk/utils/traced_exception.py,sha256=89TQdFuYZ1NJgmFpqLzY_T_T_64TpJYmVqs119Bp43g,6164
|
334
|
-
airbyte_cdk-6.6.
|
335
|
-
airbyte_cdk-6.6.
|
336
|
-
airbyte_cdk-6.6.
|
337
|
-
airbyte_cdk-6.6.
|
338
|
-
airbyte_cdk-6.6.
|
334
|
+
airbyte_cdk-6.6.8rc1.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
335
|
+
airbyte_cdk-6.6.8rc1.dist-info/METADATA,sha256=h38nyc2RT2vrfngti0tfVCJWo-GpgsuXH_FUlLahfGI,13345
|
336
|
+
airbyte_cdk-6.6.8rc1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
337
|
+
airbyte_cdk-6.6.8rc1.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
|
338
|
+
airbyte_cdk-6.6.8rc1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|