airbyte-cdk 6.60.5__py3-none-any.whl → 6.60.6__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.
@@ -2112,6 +2112,15 @@ class ModelToComponentFactory:
2112
2112
  stream_slicer: Optional[PartitionRouter],
2113
2113
  config: Config,
2114
2114
  ) -> Optional[StreamSlicer]:
2115
+ state_transformations = (
2116
+ [
2117
+ self._create_component_from_model(state_migration, config, declarative_stream=model)
2118
+ for state_migration in model.state_migrations
2119
+ ]
2120
+ if model.state_migrations
2121
+ else []
2122
+ )
2123
+
2115
2124
  if model.incremental_sync and stream_slicer:
2116
2125
  if model.retriever.type == "AsyncRetriever":
2117
2126
  stream_name = model.name or ""
@@ -2119,16 +2128,6 @@ class ModelToComponentFactory:
2119
2128
  stream_state = self._connector_state_manager.get_stream_state(
2120
2129
  stream_name, stream_namespace
2121
2130
  )
2122
- state_transformations = (
2123
- [
2124
- self._create_component_from_model(
2125
- state_migration, config, declarative_stream=model
2126
- )
2127
- for state_migration in model.state_migrations
2128
- ]
2129
- if model.state_migrations
2130
- else []
2131
- )
2132
2131
 
2133
2132
  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
2134
2133
  state_manager=self._connector_state_manager,
@@ -2172,7 +2171,7 @@ class ModelToComponentFactory:
2172
2171
  stream_name=model.name or "",
2173
2172
  stream_namespace=None,
2174
2173
  config=config or {},
2175
- stream_state_migrations=model.state_migrations,
2174
+ stream_state_migrations=state_transformations,
2176
2175
  )
2177
2176
  return self._create_component_from_model(model=model.incremental_sync, config=config) # type: ignore[no-any-return] # Will be created Cursor as stream_slicer_model is model.incremental_sync
2178
2177
  return None
@@ -2187,19 +2186,15 @@ class ModelToComponentFactory:
2187
2186
  stream_name=model.name or "", namespace=None
2188
2187
  )
2189
2188
 
2190
- if model.incremental_sync and stream_slicer:
2191
- # FIXME there is a discrepancy where this logic is applied on the create_*_cursor methods for
2192
- # ConcurrentCursor but it is applied outside of create_concurrent_cursor_from_perpartition_cursor
2193
- if model.state_migrations:
2194
- state_transformations = [
2195
- self._create_component_from_model(
2196
- state_migration, config, declarative_stream=model
2197
- )
2198
- for state_migration in model.state_migrations
2199
- ]
2200
- else:
2201
- state_transformations = []
2189
+ if model.state_migrations:
2190
+ state_transformations = [
2191
+ self._create_component_from_model(state_migration, config, declarative_stream=model)
2192
+ for state_migration in model.state_migrations
2193
+ ]
2194
+ else:
2195
+ state_transformations = []
2202
2196
 
2197
+ if model.incremental_sync and stream_slicer:
2203
2198
  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
2204
2199
  state_manager=self._connector_state_manager,
2205
2200
  model_type=DatetimeBasedCursorModel,
@@ -2220,7 +2215,7 @@ class ModelToComponentFactory:
2220
2215
  stream_name=model.name or "",
2221
2216
  stream_namespace=None,
2222
2217
  config=config or {},
2223
- stream_state_migrations=model.state_migrations,
2218
+ stream_state_migrations=state_transformations,
2224
2219
  )
2225
2220
  elif type(model.incremental_sync) == DatetimeBasedCursorModel:
2226
2221
  return self.create_concurrent_cursor_from_datetime_based_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
@@ -2229,7 +2224,7 @@ class ModelToComponentFactory:
2229
2224
  stream_name=model.name or "",
2230
2225
  stream_namespace=None,
2231
2226
  config=config or {},
2232
- stream_state_migrations=model.state_migrations,
2227
+ stream_state_migrations=state_transformations,
2233
2228
  attempt_to_create_cursor_if_not_provided=True,
2234
2229
  )
2235
2230
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 6.60.5
3
+ Version: 6.60.6
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -141,7 +141,7 @@ airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=wnRUP0Xeru9R
141
141
  airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=2UdpCz3yi7ISZTyqkQXSSy3dMxeyOWqV7OlAS5b9GVg,11568
142
142
  airbyte_cdk/sources/declarative/parsers/manifest_normalizer.py,sha256=EtKjS9c94yNp3AwQC8KUCQaAYW5T3zvFYxoWYjc_buI,19729
143
143
  airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py,sha256=pJmg78vqE5VfUrF_KJnWjucQ4k9IWFULeAxHCowrHXE,6806
144
- airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=rKp3chyB0iil4j-ekGmBA0Y2T7XbVM34pqpN3jNdvYc,181864
144
+ airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=zr4oBy1MCbsJtOf4gffEQOFo5wX5oq9lhIpVUmyNJoE,181452
145
145
  airbyte_cdk/sources/declarative/partition_routers/__init__.py,sha256=TBC9AkGaUqHm2IKHMPN6punBIcY5tWGULowcLoAVkfw,1109
146
146
  airbyte_cdk/sources/declarative/partition_routers/async_job_partition_router.py,sha256=VelO7zKqKtzMJ35jyFeg0ypJLQC0plqqIBNXoBW1G2E,3001
147
147
  airbyte_cdk/sources/declarative/partition_routers/cartesian_product_stream_slicer.py,sha256=c5cuVFM6NFkuQqG8Z5IwkBuwDrvXZN1CunUOM_L0ezg,6892
@@ -424,9 +424,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
424
424
  airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
425
425
  airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
426
426
  airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
427
- airbyte_cdk-6.60.5.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
428
- airbyte_cdk-6.60.5.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
429
- airbyte_cdk-6.60.5.dist-info/METADATA,sha256=yahbZHg8wSRJzuHofj2niQmhXaW5dxJftOi6tchY3F8,6477
430
- airbyte_cdk-6.60.5.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
431
- airbyte_cdk-6.60.5.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
432
- airbyte_cdk-6.60.5.dist-info/RECORD,,
427
+ airbyte_cdk-6.60.6.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
428
+ airbyte_cdk-6.60.6.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
429
+ airbyte_cdk-6.60.6.dist-info/METADATA,sha256=vBBBXSNK-7Pm_tvzFtO1m7css_XEbBMi6F4A0mhgBmA,6477
430
+ airbyte_cdk-6.60.6.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
431
+ airbyte_cdk-6.60.6.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
432
+ airbyte_cdk-6.60.6.dist-info/RECORD,,