airbyte-cdk 7.0.2__py3-none-any.whl → 7.0.3__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/parsers/model_to_component_factory.py +39 -7
- {airbyte_cdk-7.0.2.dist-info → airbyte_cdk-7.0.3.dist-info}/METADATA +1 -1
- {airbyte_cdk-7.0.2.dist-info → airbyte_cdk-7.0.3.dist-info}/RECORD +7 -7
- {airbyte_cdk-7.0.2.dist-info → airbyte_cdk-7.0.3.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-7.0.2.dist-info → airbyte_cdk-7.0.3.dist-info}/LICENSE_SHORT +0 -0
- {airbyte_cdk-7.0.2.dist-info → airbyte_cdk-7.0.3.dist-info}/WHEEL +0 -0
- {airbyte_cdk-7.0.2.dist-info → airbyte_cdk-7.0.3.dist-info}/entry_points.txt +0 -0
@@ -1976,7 +1976,10 @@ class ModelToComponentFactory:
|
|
1976
1976
|
primary_key = model.primary_key.__root__ if model.primary_key else None
|
1977
1977
|
|
1978
1978
|
partition_router = self._build_stream_slicer_from_partition_router(
|
1979
|
-
model.retriever,
|
1979
|
+
model.retriever,
|
1980
|
+
config,
|
1981
|
+
stream_name=model.name,
|
1982
|
+
**kwargs,
|
1980
1983
|
)
|
1981
1984
|
concurrent_cursor = self._build_concurrent_cursor(model, partition_router, config)
|
1982
1985
|
if model.incremental_sync and isinstance(model.incremental_sync, DatetimeBasedCursorModel):
|
@@ -2155,10 +2158,11 @@ class ModelToComponentFactory:
|
|
2155
2158
|
],
|
2156
2159
|
config: Config,
|
2157
2160
|
stream_name: Optional[str] = None,
|
2161
|
+
**kwargs: Any,
|
2158
2162
|
) -> PartitionRouter:
|
2159
2163
|
if (
|
2160
2164
|
hasattr(model, "partition_router")
|
2161
|
-
and isinstance(model, SimpleRetrieverModel
|
2165
|
+
and isinstance(model, (SimpleRetrieverModel, AsyncRetrieverModel, CustomRetrieverModel))
|
2162
2166
|
and model.partition_router
|
2163
2167
|
):
|
2164
2168
|
stream_slicer_model = model.partition_router
|
@@ -2172,6 +2176,23 @@ class ModelToComponentFactory:
|
|
2172
2176
|
],
|
2173
2177
|
parameters={},
|
2174
2178
|
)
|
2179
|
+
elif isinstance(stream_slicer_model, dict):
|
2180
|
+
# partition router comes from CustomRetrieverModel therefore has not been parsed as a model
|
2181
|
+
params = stream_slicer_model.get("$parameters")
|
2182
|
+
if not isinstance(params, dict):
|
2183
|
+
params = {}
|
2184
|
+
stream_slicer_model["$parameters"] = params
|
2185
|
+
|
2186
|
+
if stream_name is not None:
|
2187
|
+
params["stream_name"] = stream_name
|
2188
|
+
|
2189
|
+
return self._create_nested_component( # type: ignore[no-any-return] # There is no guarantee that this will return a stream slicer. If not, we expect an AttributeError during the call to `stream_slices`
|
2190
|
+
model,
|
2191
|
+
"partition_router",
|
2192
|
+
stream_slicer_model,
|
2193
|
+
config,
|
2194
|
+
**kwargs,
|
2195
|
+
)
|
2175
2196
|
else:
|
2176
2197
|
return self._create_component_from_model( # type: ignore[no-any-return] # Will be created PartitionRouter as stream_slicer_model is model.partition_router
|
2177
2198
|
model=stream_slicer_model, config=config, stream_name=stream_name or ""
|
@@ -2886,7 +2907,7 @@ class ModelToComponentFactory:
|
|
2886
2907
|
)
|
2887
2908
|
|
2888
2909
|
def create_parent_stream_config(
|
2889
|
-
self, model: ParentStreamConfigModel, config: Config, stream_name: str, **kwargs: Any
|
2910
|
+
self, model: ParentStreamConfigModel, config: Config, *, stream_name: str, **kwargs: Any
|
2890
2911
|
) -> ParentStreamConfig:
|
2891
2912
|
declarative_stream = self._create_component_from_model(
|
2892
2913
|
model.stream,
|
@@ -3693,14 +3714,19 @@ class ModelToComponentFactory:
|
|
3693
3714
|
)
|
3694
3715
|
|
3695
3716
|
def create_substream_partition_router(
|
3696
|
-
self,
|
3717
|
+
self,
|
3718
|
+
model: SubstreamPartitionRouterModel,
|
3719
|
+
config: Config,
|
3720
|
+
*,
|
3721
|
+
stream_name: str,
|
3722
|
+
**kwargs: Any,
|
3697
3723
|
) -> SubstreamPartitionRouter:
|
3698
3724
|
parent_stream_configs = []
|
3699
3725
|
if model.parent_stream_configs:
|
3700
3726
|
parent_stream_configs.extend(
|
3701
3727
|
[
|
3702
3728
|
self.create_parent_stream_config_with_substream_wrapper(
|
3703
|
-
model=parent_stream_config, config=config, **kwargs
|
3729
|
+
model=parent_stream_config, config=config, stream_name=stream_name, **kwargs
|
3704
3730
|
)
|
3705
3731
|
for parent_stream_config in model.parent_stream_configs
|
3706
3732
|
]
|
@@ -3720,7 +3746,7 @@ class ModelToComponentFactory:
|
|
3720
3746
|
|
3721
3747
|
# This flag will be used exclusively for StateDelegatingStream when a parent stream is created
|
3722
3748
|
has_parent_state = bool(
|
3723
|
-
self._connector_state_manager.get_stream_state(
|
3749
|
+
self._connector_state_manager.get_stream_state(stream_name, None)
|
3724
3750
|
if model.incremental_dependency
|
3725
3751
|
else False
|
3726
3752
|
)
|
@@ -4113,11 +4139,17 @@ class ModelToComponentFactory:
|
|
4113
4139
|
)
|
4114
4140
|
|
4115
4141
|
def create_grouping_partition_router(
|
4116
|
-
self,
|
4142
|
+
self,
|
4143
|
+
model: GroupingPartitionRouterModel,
|
4144
|
+
config: Config,
|
4145
|
+
*,
|
4146
|
+
stream_name: str,
|
4147
|
+
**kwargs: Any,
|
4117
4148
|
) -> GroupingPartitionRouter:
|
4118
4149
|
underlying_router = self._create_component_from_model(
|
4119
4150
|
model=model.underlying_partition_router,
|
4120
4151
|
config=config,
|
4152
|
+
stream_name=stream_name,
|
4121
4153
|
**kwargs,
|
4122
4154
|
)
|
4123
4155
|
if model.group_size < 1:
|
@@ -172,7 +172,7 @@ airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=wnRUP0Xeru9R
|
|
172
172
|
airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=la9Ulpc0lQewiBLKJ0FpsWxyU5XISv-ulmFRHJLJ1Pc,11292
|
173
173
|
airbyte_cdk/sources/declarative/parsers/manifest_normalizer.py,sha256=EtKjS9c94yNp3AwQC8KUCQaAYW5T3zvFYxoWYjc_buI,19729
|
174
174
|
airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py,sha256=pJmg78vqE5VfUrF_KJnWjucQ4k9IWFULeAxHCowrHXE,6806
|
175
|
-
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=
|
175
|
+
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=Zu4E2nvPzGyi_EnmbdrUrQ1myUvPQ5GtcWITzksYMcQ,184235
|
176
176
|
airbyte_cdk/sources/declarative/partition_routers/__init__.py,sha256=TBC9AkGaUqHm2IKHMPN6punBIcY5tWGULowcLoAVkfw,1109
|
177
177
|
airbyte_cdk/sources/declarative/partition_routers/async_job_partition_router.py,sha256=VelO7zKqKtzMJ35jyFeg0ypJLQC0plqqIBNXoBW1G2E,3001
|
178
178
|
airbyte_cdk/sources/declarative/partition_routers/cartesian_product_stream_slicer.py,sha256=ocm4hZ4k-tEGs5HLrtI8ecWSK0hGqNH0Rvz2byx_HZk,6927
|
@@ -457,9 +457,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
|
|
457
457
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=9YDJmnIGFsT51CVQf2tSSvTapGimITjEFGbUTSZAGTI,963
|
458
458
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
459
459
|
airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
|
460
|
-
airbyte_cdk-7.0.
|
461
|
-
airbyte_cdk-7.0.
|
462
|
-
airbyte_cdk-7.0.
|
463
|
-
airbyte_cdk-7.0.
|
464
|
-
airbyte_cdk-7.0.
|
465
|
-
airbyte_cdk-7.0.
|
460
|
+
airbyte_cdk-7.0.3.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
461
|
+
airbyte_cdk-7.0.3.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
462
|
+
airbyte_cdk-7.0.3.dist-info/METADATA,sha256=H974zlTwTHg5w991ZshrilcgpSUMVvHCTlMcUrMOf6E,6799
|
463
|
+
airbyte_cdk-7.0.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
464
|
+
airbyte_cdk-7.0.3.dist-info/entry_points.txt,sha256=eLZ2UYvJZGm1s07Pplcs--1Gim60YhZWTb53j_dghwU,195
|
465
|
+
airbyte_cdk-7.0.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|