airbyte-cdk 6.48.14__py3-none-any.whl → 6.48.14.post1.dev15054311822__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/migrations/legacy_to_per_partition_state_migration.py +3 -0
- airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +14 -2
- {airbyte_cdk-6.48.14.dist-info → airbyte_cdk-6.48.14.post1.dev15054311822.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.48.14.dist-info → airbyte_cdk-6.48.14.post1.dev15054311822.dist-info}/RECORD +8 -8
- {airbyte_cdk-6.48.14.dist-info → airbyte_cdk-6.48.14.post1.dev15054311822.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.48.14.dist-info → airbyte_cdk-6.48.14.post1.dev15054311822.dist-info}/LICENSE_SHORT +0 -0
- {airbyte_cdk-6.48.14.dist-info → airbyte_cdk-6.48.14.post1.dev15054311822.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.48.14.dist-info → airbyte_cdk-6.48.14.post1.dev15054311822.dist-info}/entry_points.txt +0 -0
@@ -88,6 +88,9 @@ class LegacyToPerPartitionStateMigration(StateMigration):
|
|
88
88
|
if keys[0] != self._cursor_field:
|
89
89
|
# Unexpected key. Found {keys[0]}. Expected {self._cursor.cursor_field}
|
90
90
|
return False
|
91
|
+
# it is expected the internal value to be a dictionary according to docstring
|
92
|
+
else:
|
93
|
+
return False
|
91
94
|
return True
|
92
95
|
|
93
96
|
def migrate(self, stream_state: Mapping[str, Any]) -> Mapping[str, Any]:
|
@@ -928,9 +928,9 @@ class ModelToComponentFactory:
|
|
928
928
|
declarative_stream: DeclarativeStreamModel,
|
929
929
|
) -> LegacyToPerPartitionStateMigration:
|
930
930
|
retriever = declarative_stream.retriever
|
931
|
-
if not isinstance(retriever, SimpleRetrieverModel):
|
931
|
+
if not isinstance(retriever, (SimpleRetrieverModel, AsyncRetrieverModel)):
|
932
932
|
raise ValueError(
|
933
|
-
f"LegacyToPerPartitionStateMigrations can only be applied on a DeclarativeStream with a SimpleRetriever. Got {type(retriever)}"
|
933
|
+
f"LegacyToPerPartitionStateMigrations can only be applied on a DeclarativeStream with a SimpleRetriever or AsyncRetriever. Got {type(retriever)}"
|
934
934
|
)
|
935
935
|
partition_router = retriever.partition_router
|
936
936
|
if not isinstance(
|
@@ -1999,6 +1999,17 @@ class ModelToComponentFactory:
|
|
1999
1999
|
stream_state = self._connector_state_manager.get_stream_state(
|
2000
2000
|
stream_name, stream_namespace
|
2001
2001
|
)
|
2002
|
+
state_transformations = (
|
2003
|
+
[
|
2004
|
+
self._create_component_from_model(
|
2005
|
+
state_migration, config, declarative_stream=model
|
2006
|
+
)
|
2007
|
+
for state_migration in model.state_migrations
|
2008
|
+
]
|
2009
|
+
if model.state_migrations
|
2010
|
+
else []
|
2011
|
+
)
|
2012
|
+
|
2002
2013
|
return self.create_concurrent_cursor_from_perpartition_cursor( # type: ignore # This is a known issue that we are creating and returning a ConcurrentCursor which does not technically implement the (low-code) StreamSlicer. However, (low-code) StreamSlicer and ConcurrentCursor both implement StreamSlicer.stream_slices() which is the primary method needed for checkpointing
|
2003
2014
|
state_manager=self._connector_state_manager,
|
2004
2015
|
model_type=DatetimeBasedCursorModel,
|
@@ -2007,6 +2018,7 @@ class ModelToComponentFactory:
|
|
2007
2018
|
stream_namespace=stream_namespace,
|
2008
2019
|
config=config or {},
|
2009
2020
|
stream_state=stream_state,
|
2021
|
+
stream_state_migrations=state_transformations,
|
2010
2022
|
partition_router=stream_slicer,
|
2011
2023
|
)
|
2012
2024
|
|
@@ -129,7 +129,7 @@ airbyte_cdk/sources/declarative/interpolation/jinja.py,sha256=UQeuS4Vpyp4hlOn-R3
|
|
129
129
|
airbyte_cdk/sources/declarative/interpolation/macros.py,sha256=UYSJ5gW7TkHALYnNvUnRP3RlyGwGuRMObF3BHuNzjJM,5320
|
130
130
|
airbyte_cdk/sources/declarative/manifest_declarative_source.py,sha256=cZNUOeIogrCmCS7RXeJqQIlnsANigz1cngpLko02M2g,23191
|
131
131
|
airbyte_cdk/sources/declarative/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
132
|
-
airbyte_cdk/sources/declarative/migrations/legacy_to_per_partition_state_migration.py,sha256=
|
132
|
+
airbyte_cdk/sources/declarative/migrations/legacy_to_per_partition_state_migration.py,sha256=9GiDuR4Fs8_tBlf15KlUj_rwJA1X0li5cpwrLw9tKqw,4073
|
133
133
|
airbyte_cdk/sources/declarative/migrations/state_migration.py,sha256=KWPjealMLKSMtajXgkdGgKg7EmTLR-CqqD7UIh0-eDU,794
|
134
134
|
airbyte_cdk/sources/declarative/models/__init__.py,sha256=nUFxNCiKeYRVXuZEKA7GD-lTHxsiKcQ8FitZjKhPIvE,100
|
135
135
|
airbyte_cdk/sources/declarative/models/base_model_with_deprecations.py,sha256=Imnj3yef0aqRdLfaUxkIYISUb8YkiPrRH_wBd-x8HjM,5999
|
@@ -140,7 +140,7 @@ airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=wnRUP0Xeru9R
|
|
140
140
|
airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=2UdpCz3yi7ISZTyqkQXSSy3dMxeyOWqV7OlAS5b9GVg,11568
|
141
141
|
airbyte_cdk/sources/declarative/parsers/manifest_normalizer.py,sha256=laBy7ebjA-PiNwc-50U4FHvMqS_mmHvnabxgFs4CjGw,17069
|
142
142
|
airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py,sha256=pJmg78vqE5VfUrF_KJnWjucQ4k9IWFULeAxHCowrHXE,6806
|
143
|
-
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=
|
143
|
+
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=uPefJHWYdLxupSVqI4_VnU30JlbA44EQ7GwY0RdfaVw,168443
|
144
144
|
airbyte_cdk/sources/declarative/partition_routers/__init__.py,sha256=TBC9AkGaUqHm2IKHMPN6punBIcY5tWGULowcLoAVkfw,1109
|
145
145
|
airbyte_cdk/sources/declarative/partition_routers/async_job_partition_router.py,sha256=VelO7zKqKtzMJ35jyFeg0ypJLQC0plqqIBNXoBW1G2E,3001
|
146
146
|
airbyte_cdk/sources/declarative/partition_routers/cartesian_product_stream_slicer.py,sha256=c5cuVFM6NFkuQqG8Z5IwkBuwDrvXZN1CunUOM_L0ezg,6892
|
@@ -419,9 +419,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
|
|
419
419
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
|
420
420
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
421
421
|
airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
|
422
|
-
airbyte_cdk-6.48.14.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
423
|
-
airbyte_cdk-6.48.14.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
424
|
-
airbyte_cdk-6.48.14.dist-info/METADATA,sha256=
|
425
|
-
airbyte_cdk-6.48.14.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
426
|
-
airbyte_cdk-6.48.14.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
|
427
|
-
airbyte_cdk-6.48.14.dist-info/RECORD,,
|
422
|
+
airbyte_cdk-6.48.14.post1.dev15054311822.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
423
|
+
airbyte_cdk-6.48.14.post1.dev15054311822.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
424
|
+
airbyte_cdk-6.48.14.post1.dev15054311822.dist-info/METADATA,sha256=AzS8LkzcmckHJwt9xfEGjZSUr6qLxmLh-3Lrz6GGm7g,6365
|
425
|
+
airbyte_cdk-6.48.14.post1.dev15054311822.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
426
|
+
airbyte_cdk-6.48.14.post1.dev15054311822.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
|
427
|
+
airbyte_cdk-6.48.14.post1.dev15054311822.dist-info/RECORD,,
|
{airbyte_cdk-6.48.14.dist-info → airbyte_cdk-6.48.14.post1.dev15054311822.dist-info}/LICENSE.txt
RENAMED
File without changes
|
{airbyte_cdk-6.48.14.dist-info → airbyte_cdk-6.48.14.post1.dev15054311822.dist-info}/LICENSE_SHORT
RENAMED
File without changes
|
File without changes
|
File without changes
|