airbyte-cdk 6.8.0rc1__py3-none-any.whl → 6.8.0rc2__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.
@@ -205,18 +205,15 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
205
205
  declarative_stream.name
206
206
  ].get("incremental_sync")
207
207
 
208
- is_without_partition_router_or_cursor = not bool(
209
- incremental_sync_component_definition
210
- ) and not (
211
- name_to_stream_mapping[declarative_stream.name]
212
- .get("retriever", {})
213
- .get("partition_router")
214
- )
208
+
215
209
  partition_router_component_definition = (
216
210
  name_to_stream_mapping[declarative_stream.name]
217
211
  .get("retriever")
218
212
  .get("partition_router")
219
213
  )
214
+ is_without_partition_router_or_cursor = not bool(
215
+ incremental_sync_component_definition
216
+ ) and not bool(partition_router_component_definition)
220
217
 
221
218
  is_substream_without_incremental = (
222
219
  partition_router_component_definition
@@ -272,9 +269,8 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
272
269
  )
273
270
  )
274
271
  elif (
275
- is_substream_without_incremental
276
- and hasattr(declarative_stream.retriever, "stream_slicer")
277
- ) or is_without_partition_router_or_cursor:
272
+ is_substream_without_incremental or is_without_partition_router_or_cursor
273
+ ) and hasattr(declarative_stream.retriever, "stream_slicer"):
278
274
  partition_generator = StreamSlicerPartitionGenerator(
279
275
  DeclarativePartitionFactory(
280
276
  declarative_stream.name,
@@ -315,10 +311,12 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
315
311
  return concurrent_streams, synchronous_streams
316
312
 
317
313
  def _is_datetime_incremental_without_partition_routing(
318
- self, declarative_stream, incremental_sync_component_definition
319
- ):
314
+ self,
315
+ declarative_stream: DeclarativeStream,
316
+ incremental_sync_component_definition: Mapping[str, Any],
317
+ ) -> bool:
320
318
  return (
321
- incremental_sync_component_definition
319
+ bool(incremental_sync_component_definition)
322
320
  and incremental_sync_component_definition.get("type", "")
323
321
  == DatetimeBasedCursorModel.__name__
324
322
  and self._stream_supports_concurrent_partition_processing(
@@ -13,8 +13,15 @@ def get_primary_key_from_stream(
13
13
  elif isinstance(stream_primary_key, str):
14
14
  return [stream_primary_key]
15
15
  elif isinstance(stream_primary_key, list):
16
- if len(stream_primary_key) > 0 and all(isinstance(k, str) for k in stream_primary_key):
16
+ are_all_elements_str = all(isinstance(k, str) for k in stream_primary_key)
17
+ are_all_elements_list_of_size_one = all(
18
+ isinstance(k, list) and len(k) == 1 for k in stream_primary_key
19
+ )
20
+
21
+ if are_all_elements_str:
17
22
  return stream_primary_key # type: ignore # We verified all items in the list are strings
23
+ elif are_all_elements_list_of_size_one:
24
+ return list(map(lambda x: x[0], stream_primary_key))
18
25
  else:
19
26
  raise ValueError(f"Nested primary keys are not supported. Found {stream_primary_key}")
20
27
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 6.8.0rc1
3
+ Version: 6.8.0rc2
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -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=dQs_GovwXc_EPBjUZ4fpZFkGklpFuoq_qFmAFFtIz-g,23469
65
+ airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=UEcL0X9dt12fApHG4YqITHxl9a1F210hdIUZkWDZupM,23388
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
@@ -248,7 +248,7 @@ airbyte_cdk/sources/streams/concurrent/availability_strategy.py,sha256=xqErZU9v9
248
248
  airbyte_cdk/sources/streams/concurrent/cursor.py,sha256=JX1MEtQZzRhYlr8wghBd5uC5geO7_Xh2aA4wIFDLE8s,20897
249
249
  airbyte_cdk/sources/streams/concurrent/default_stream.py,sha256=K3rLMpYhS7nnmvwQ52lqBy7DQdFMJpvvT7sgBg_ckA8,3207
250
250
  airbyte_cdk/sources/streams/concurrent/exceptions.py,sha256=JOZ446MCLpmF26r9KfS6OO_6rGjcjgJNZdcw6jccjEI,468
251
- airbyte_cdk/sources/streams/concurrent/helpers.py,sha256=gtj9p0clZwgnClrIRH6V2Wl0Jwu11Plq-9FP4FU2VQA,1327
251
+ airbyte_cdk/sources/streams/concurrent/helpers.py,sha256=S6AW8TgIASCZ2UuUcQLE8OzgYUHWt2-KPOvNPwnQf-Q,1596
252
252
  airbyte_cdk/sources/streams/concurrent/partition_enqueuer.py,sha256=2t64b_z9cEPmlHZnjSiMTO8PEtEdiAJDG0JcYOtUqAE,3363
253
253
  airbyte_cdk/sources/streams/concurrent/partition_reader.py,sha256=0TIrjbTzYJGdA0AZUzbeIKr0iHbawnoEKVl7bWxOFZY,1760
254
254
  airbyte_cdk/sources/streams/concurrent/partitions/__init__.py,sha256=4Hw-PX1-VgESLF16cDdvuYCzGJtHntThLF4qIiULWeo,61
@@ -330,8 +330,8 @@ airbyte_cdk/utils/slice_hasher.py,sha256=-pHexlNYoWYPnXNH-M7HEbjmeJe9Zk7SJijdQ7d
330
330
  airbyte_cdk/utils/spec_schema_transformations.py,sha256=LVc9KbtMeV_z99jWo0Ou8u4l6eBJ0BWNhxj4zrrGKRs,763
331
331
  airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
332
332
  airbyte_cdk/utils/traced_exception.py,sha256=a6q51tBS3IdtefuOiL1eBwSmnNAXfjFMlMjSIQ_Tl-o,6165
333
- airbyte_cdk-6.8.0rc1.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
334
- airbyte_cdk-6.8.0rc1.dist-info/METADATA,sha256=YOrRK51OQ_qmAsYmGE-8vdPkI7AnjIa6srLberRWNBU,13522
335
- airbyte_cdk-6.8.0rc1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
336
- airbyte_cdk-6.8.0rc1.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
337
- airbyte_cdk-6.8.0rc1.dist-info/RECORD,,
333
+ airbyte_cdk-6.8.0rc2.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
334
+ airbyte_cdk-6.8.0rc2.dist-info/METADATA,sha256=Q32PwRoKEslggtbExSg55vYsS4Gwzi7xP7YtoUN6Muk,13522
335
+ airbyte_cdk-6.8.0rc2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
336
+ airbyte_cdk-6.8.0rc2.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
337
+ airbyte_cdk-6.8.0rc2.dist-info/RECORD,,