airbyte-cdk 6.23.0__tar.gz → 6.23.0.dev0__tar.gz

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.
Files changed (354) hide show
  1. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/PKG-INFO +1 -1
  2. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/concurrent_declarative_source.py +80 -16
  3. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/extractors/record_filter.py +3 -5
  4. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/incremental/__init__.py +6 -0
  5. airbyte_cdk-6.23.0.dev0/airbyte_cdk/sources/declarative/incremental/concurrent_partition_cursor.py +333 -0
  6. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/incremental/global_substream_cursor.py +3 -0
  7. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/incremental/per_partition_cursor.py +15 -0
  8. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +86 -15
  9. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py +1 -1
  10. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/cursor.py +30 -21
  11. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/pyproject.toml +1 -1
  12. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/LICENSE.txt +0 -0
  13. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/README.md +0 -0
  14. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/__init__.py +0 -0
  15. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/cli/__init__.py +0 -0
  16. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/cli/source_declarative_manifest/__init__.py +0 -0
  17. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/cli/source_declarative_manifest/_run.py +0 -0
  18. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/cli/source_declarative_manifest/spec.json +0 -0
  19. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/config_observation.py +0 -0
  20. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/connector.py +0 -0
  21. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/connector_builder/README.md +0 -0
  22. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/connector_builder/__init__.py +0 -0
  23. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/connector_builder/connector_builder_handler.py +0 -0
  24. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/connector_builder/main.py +0 -0
  25. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/connector_builder/message_grouper.py +0 -0
  26. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/connector_builder/models.py +0 -0
  27. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/destinations/__init__.py +0 -0
  28. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/destinations/destination.py +0 -0
  29. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/destinations/vector_db_based/README.md +0 -0
  30. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/destinations/vector_db_based/__init__.py +0 -0
  31. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/destinations/vector_db_based/config.py +0 -0
  32. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/destinations/vector_db_based/document_processor.py +0 -0
  33. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/destinations/vector_db_based/embedder.py +0 -0
  34. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/destinations/vector_db_based/indexer.py +0 -0
  35. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/destinations/vector_db_based/test_utils.py +0 -0
  36. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/destinations/vector_db_based/utils.py +0 -0
  37. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/destinations/vector_db_based/writer.py +0 -0
  38. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/entrypoint.py +0 -0
  39. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/exception_handler.py +0 -0
  40. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/logger.py +0 -0
  41. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/models/__init__.py +0 -0
  42. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/models/airbyte_protocol.py +0 -0
  43. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/models/airbyte_protocol_serializers.py +0 -0
  44. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/models/file_transfer_record_message.py +0 -0
  45. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/models/well_known_types.py +0 -0
  46. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/py.typed +0 -0
  47. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/__init__.py +0 -0
  48. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/abstract_source.py +0 -0
  49. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/concurrent_source/__init__.py +0 -0
  50. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/concurrent_source/concurrent_read_processor.py +0 -0
  51. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/concurrent_source/concurrent_source.py +0 -0
  52. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/concurrent_source/concurrent_source_adapter.py +0 -0
  53. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/concurrent_source/partition_generation_completed_sentinel.py +0 -0
  54. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/concurrent_source/stream_thread_exception.py +0 -0
  55. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/concurrent_source/thread_pool_manager.py +0 -0
  56. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/config.py +0 -0
  57. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/connector_state_manager.py +0 -0
  58. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/__init__.py +0 -0
  59. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/async_job/__init__.py +0 -0
  60. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/async_job/job.py +0 -0
  61. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/async_job/job_orchestrator.py +0 -0
  62. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/async_job/job_tracker.py +0 -0
  63. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/async_job/repository.py +0 -0
  64. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/async_job/status.py +0 -0
  65. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/async_job/timer.py +0 -0
  66. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/auth/__init__.py +0 -0
  67. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/auth/declarative_authenticator.py +0 -0
  68. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/auth/jwt.py +0 -0
  69. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/auth/oauth.py +0 -0
  70. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/auth/selective_authenticator.py +0 -0
  71. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/auth/token.py +0 -0
  72. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/auth/token_provider.py +0 -0
  73. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/checks/__init__.py +0 -0
  74. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/checks/check_dynamic_stream.py +0 -0
  75. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/checks/check_stream.py +0 -0
  76. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/checks/connection_checker.py +0 -0
  77. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/concurrency_level/__init__.py +0 -0
  78. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/concurrency_level/concurrency_level.py +0 -0
  79. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/datetime/__init__.py +0 -0
  80. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/datetime/datetime_parser.py +0 -0
  81. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/datetime/min_max_datetime.py +0 -0
  82. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/declarative_component_schema.yaml +0 -0
  83. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/declarative_source.py +0 -0
  84. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/declarative_stream.py +0 -0
  85. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/decoders/__init__.py +0 -0
  86. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/decoders/composite_raw_decoder.py +0 -0
  87. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/decoders/decoder.py +0 -0
  88. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/decoders/json_decoder.py +0 -0
  89. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/decoders/noop_decoder.py +0 -0
  90. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/decoders/pagination_decoder_decorator.py +0 -0
  91. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/decoders/xml_decoder.py +0 -0
  92. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/decoders/zipfile_decoder.py +0 -0
  93. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/exceptions.py +0 -0
  94. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/extractors/__init__.py +0 -0
  95. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/extractors/dpath_extractor.py +0 -0
  96. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/extractors/http_selector.py +0 -0
  97. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/extractors/record_extractor.py +0 -0
  98. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/extractors/record_selector.py +0 -0
  99. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/extractors/response_to_file_extractor.py +0 -0
  100. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/extractors/type_transformer.py +0 -0
  101. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/incremental/datetime_based_cursor.py +0 -0
  102. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/incremental/declarative_cursor.py +0 -0
  103. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/incremental/per_partition_with_global.py +0 -0
  104. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/incremental/resumable_full_refresh_cursor.py +0 -0
  105. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/interpolation/__init__.py +0 -0
  106. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/interpolation/filters.py +0 -0
  107. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/interpolation/interpolated_boolean.py +0 -0
  108. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/interpolation/interpolated_mapping.py +0 -0
  109. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/interpolation/interpolated_nested_mapping.py +0 -0
  110. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/interpolation/interpolated_string.py +0 -0
  111. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/interpolation/interpolation.py +0 -0
  112. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/interpolation/jinja.py +0 -0
  113. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/interpolation/macros.py +0 -0
  114. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/manifest_declarative_source.py +0 -0
  115. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/migrations/__init__.py +0 -0
  116. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/migrations/legacy_to_per_partition_state_migration.py +0 -0
  117. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/migrations/state_migration.py +0 -0
  118. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/models/__init__.py +0 -0
  119. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/models/declarative_component_schema.py +0 -0
  120. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/parsers/__init__.py +0 -0
  121. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py +0 -0
  122. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/parsers/custom_exceptions.py +0 -0
  123. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py +0 -0
  124. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py +0 -0
  125. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/partition_routers/__init__.py +0 -0
  126. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/partition_routers/async_job_partition_router.py +0 -0
  127. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/partition_routers/cartesian_product_stream_slicer.py +0 -0
  128. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/partition_routers/list_partition_router.py +0 -0
  129. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/partition_routers/partition_router.py +0 -0
  130. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/partition_routers/single_partition_router.py +0 -0
  131. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/partition_routers/substream_partition_router.py +0 -0
  132. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/README.md +0 -0
  133. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/__init__.py +0 -0
  134. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/__init__.py +0 -0
  135. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py +0 -0
  136. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/constant_backoff_strategy.py +0 -0
  137. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/exponential_backoff_strategy.py +0 -0
  138. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/header_helper.py +0 -0
  139. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/wait_time_from_header_backoff_strategy.py +0 -0
  140. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/wait_until_time_from_header_backoff_strategy.py +0 -0
  141. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategy.py +0 -0
  142. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/composite_error_handler.py +0 -0
  143. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/default_error_handler.py +0 -0
  144. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/default_http_response_filter.py +0 -0
  145. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/error_handler.py +0 -0
  146. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/error_handlers/http_response_filter.py +0 -0
  147. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/http_job_repository.py +0 -0
  148. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/http_requester.py +0 -0
  149. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/paginators/__init__.py +0 -0
  150. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/paginators/default_paginator.py +0 -0
  151. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/paginators/no_pagination.py +0 -0
  152. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/paginators/paginator.py +0 -0
  153. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/__init__.py +0 -0
  154. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/cursor_pagination_strategy.py +0 -0
  155. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/offset_increment.py +0 -0
  156. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/page_increment.py +0 -0
  157. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/pagination_strategy.py +0 -0
  158. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/paginators/strategies/stop_condition.py +0 -0
  159. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/request_option.py +0 -0
  160. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/request_options/__init__.py +0 -0
  161. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/request_options/datetime_based_request_options_provider.py +0 -0
  162. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/request_options/default_request_options_provider.py +0 -0
  163. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/request_options/interpolated_nested_request_input_provider.py +0 -0
  164. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/request_options/interpolated_request_input_provider.py +0 -0
  165. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/request_options/interpolated_request_options_provider.py +0 -0
  166. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/request_options/request_options_provider.py +0 -0
  167. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/request_path.py +0 -0
  168. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/requesters/requester.py +0 -0
  169. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/resolvers/__init__.py +0 -0
  170. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/resolvers/components_resolver.py +0 -0
  171. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/resolvers/config_components_resolver.py +0 -0
  172. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/resolvers/http_components_resolver.py +0 -0
  173. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/retrievers/__init__.py +0 -0
  174. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/retrievers/async_retriever.py +0 -0
  175. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/retrievers/retriever.py +0 -0
  176. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/schema/__init__.py +0 -0
  177. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/schema/default_schema_loader.py +0 -0
  178. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/schema/dynamic_schema_loader.py +0 -0
  179. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/schema/inline_schema_loader.py +0 -0
  180. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/schema/json_file_schema_loader.py +0 -0
  181. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/schema/schema_loader.py +0 -0
  182. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/spec/__init__.py +0 -0
  183. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/spec/spec.py +0 -0
  184. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/stream_slicers/__init__.py +0 -0
  185. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/stream_slicers/declarative_partition_generator.py +0 -0
  186. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/stream_slicers/stream_slicer.py +0 -0
  187. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/transformations/__init__.py +0 -0
  188. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/transformations/add_fields.py +0 -0
  189. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/transformations/dpath_flatten_fields.py +0 -0
  190. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/transformations/flatten_fields.py +0 -0
  191. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/transformations/keys_replace_transformation.py +0 -0
  192. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/transformations/keys_to_lower_transformation.py +0 -0
  193. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/transformations/keys_to_snake_transformation.py +0 -0
  194. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/transformations/remove_fields.py +0 -0
  195. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/transformations/transformation.py +0 -0
  196. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/types.py +0 -0
  197. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/declarative/yaml_declarative_source.py +0 -0
  198. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/embedded/__init__.py +0 -0
  199. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/embedded/base_integration.py +0 -0
  200. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/embedded/catalog.py +0 -0
  201. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/embedded/runner.py +0 -0
  202. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/embedded/tools.py +0 -0
  203. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/README.md +0 -0
  204. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/__init__.py +0 -0
  205. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/availability_strategy/__init__.py +0 -0
  206. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/availability_strategy/abstract_file_based_availability_strategy.py +0 -0
  207. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/availability_strategy/default_file_based_availability_strategy.py +0 -0
  208. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/config/__init__.py +0 -0
  209. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/config/abstract_file_based_spec.py +0 -0
  210. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/config/avro_format.py +0 -0
  211. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/config/csv_format.py +0 -0
  212. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/config/excel_format.py +0 -0
  213. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/config/file_based_stream_config.py +0 -0
  214. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/config/jsonl_format.py +0 -0
  215. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/config/parquet_format.py +0 -0
  216. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/config/unstructured_format.py +0 -0
  217. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/discovery_policy/__init__.py +0 -0
  218. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/discovery_policy/abstract_discovery_policy.py +0 -0
  219. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/discovery_policy/default_discovery_policy.py +0 -0
  220. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/exceptions.py +0 -0
  221. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/file_based_source.py +0 -0
  222. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/file_based_stream_reader.py +0 -0
  223. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/file_types/__init__.py +0 -0
  224. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/file_types/avro_parser.py +0 -0
  225. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/file_types/csv_parser.py +0 -0
  226. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/file_types/excel_parser.py +0 -0
  227. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/file_types/file_transfer.py +0 -0
  228. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/file_types/file_type_parser.py +0 -0
  229. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/file_types/jsonl_parser.py +0 -0
  230. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/file_types/parquet_parser.py +0 -0
  231. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/file_types/unstructured_parser.py +0 -0
  232. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/remote_file.py +0 -0
  233. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/schema_helpers.py +0 -0
  234. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/schema_validation_policies/__init__.py +0 -0
  235. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/schema_validation_policies/abstract_schema_validation_policy.py +0 -0
  236. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/schema_validation_policies/default_schema_validation_policies.py +0 -0
  237. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/stream/__init__.py +0 -0
  238. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/stream/abstract_file_based_stream.py +0 -0
  239. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/stream/concurrent/__init__.py +0 -0
  240. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/stream/concurrent/adapters.py +0 -0
  241. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/stream/concurrent/cursor/__init__.py +0 -0
  242. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/stream/concurrent/cursor/abstract_concurrent_file_based_cursor.py +0 -0
  243. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/stream/concurrent/cursor/file_based_concurrent_cursor.py +0 -0
  244. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/stream/concurrent/cursor/file_based_final_state_cursor.py +0 -0
  245. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/stream/cursor/__init__.py +0 -0
  246. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/stream/cursor/abstract_file_based_cursor.py +0 -0
  247. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/stream/cursor/default_file_based_cursor.py +0 -0
  248. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/stream/default_file_based_stream.py +0 -0
  249. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/file_based/types.py +0 -0
  250. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/http_config.py +0 -0
  251. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/http_logger.py +0 -0
  252. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/message/__init__.py +0 -0
  253. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/message/repository.py +0 -0
  254. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/source.py +0 -0
  255. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/__init__.py +0 -0
  256. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/availability_strategy.py +0 -0
  257. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/call_rate.py +0 -0
  258. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/checkpoint/__init__.py +0 -0
  259. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/checkpoint/checkpoint_reader.py +0 -0
  260. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/checkpoint/cursor.py +0 -0
  261. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/checkpoint/per_partition_key_serializer.py +0 -0
  262. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/checkpoint/resumable_full_refresh_cursor.py +0 -0
  263. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/checkpoint/substream_resumable_full_refresh_cursor.py +0 -0
  264. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/README.md +0 -0
  265. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/__init__.py +0 -0
  266. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/abstract_stream.py +0 -0
  267. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/abstract_stream_facade.py +0 -0
  268. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/adapters.py +0 -0
  269. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/availability_strategy.py +0 -0
  270. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/default_stream.py +0 -0
  271. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/exceptions.py +0 -0
  272. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/helpers.py +0 -0
  273. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/partition_enqueuer.py +0 -0
  274. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/partition_reader.py +0 -0
  275. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/partitions/__init__.py +0 -0
  276. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/partitions/partition.py +0 -0
  277. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/partitions/partition_generator.py +0 -0
  278. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/partitions/stream_slicer.py +0 -0
  279. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/partitions/types.py +0 -0
  280. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/state_converters/__init__.py +0 -0
  281. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/state_converters/abstract_stream_state_converter.py +0 -0
  282. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/concurrent/state_converters/datetime_stream_state_converter.py +0 -0
  283. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/core.py +0 -0
  284. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/__init__.py +0 -0
  285. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/availability_strategy.py +0 -0
  286. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/error_handlers/__init__.py +0 -0
  287. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/error_handlers/backoff_strategy.py +0 -0
  288. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/error_handlers/default_backoff_strategy.py +0 -0
  289. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/error_handlers/default_error_mapping.py +0 -0
  290. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/error_handlers/error_handler.py +0 -0
  291. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/error_handlers/error_message_parser.py +0 -0
  292. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/error_handlers/http_status_error_handler.py +0 -0
  293. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/error_handlers/json_error_message_parser.py +0 -0
  294. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/error_handlers/response_models.py +0 -0
  295. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/exceptions.py +0 -0
  296. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/http.py +0 -0
  297. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/http_client.py +0 -0
  298. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/rate_limiting.py +0 -0
  299. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/requests_native_auth/__init__.py +0 -0
  300. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/requests_native_auth/abstract_oauth.py +0 -0
  301. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/requests_native_auth/abstract_token.py +0 -0
  302. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/requests_native_auth/oauth.py +0 -0
  303. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/http/requests_native_auth/token.py +0 -0
  304. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/streams/utils/__init__.py +0 -0
  305. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/types.py +0 -0
  306. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/utils/__init__.py +0 -0
  307. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/utils/casing.py +0 -0
  308. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/utils/record_helper.py +0 -0
  309. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/utils/schema_helpers.py +0 -0
  310. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/utils/slice_logger.py +0 -0
  311. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/utils/transform.py +0 -0
  312. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sources/utils/types.py +0 -0
  313. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sql/__init__.py +0 -0
  314. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sql/_util/__init__.py +0 -0
  315. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sql/_util/hashing.py +0 -0
  316. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sql/_util/name_normalizers.py +0 -0
  317. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sql/constants.py +0 -0
  318. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sql/exceptions.py +0 -0
  319. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sql/secrets.py +0 -0
  320. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sql/shared/__init__.py +0 -0
  321. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sql/shared/catalog_providers.py +0 -0
  322. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sql/shared/sql_processor.py +0 -0
  323. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/sql/types.py +0 -0
  324. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/__init__.py +0 -0
  325. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/catalog_builder.py +0 -0
  326. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/entrypoint_wrapper.py +0 -0
  327. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/mock_http/__init__.py +0 -0
  328. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/mock_http/matcher.py +0 -0
  329. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/mock_http/mocker.py +0 -0
  330. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/mock_http/request.py +0 -0
  331. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/mock_http/response.py +0 -0
  332. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/mock_http/response_builder.py +0 -0
  333. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/state_builder.py +0 -0
  334. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/utils/__init__.py +0 -0
  335. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/utils/data.py +0 -0
  336. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/utils/http_mocking.py +0 -0
  337. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/utils/manifest_only_fixtures.py +0 -0
  338. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/test/utils/reading.py +0 -0
  339. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/__init__.py +0 -0
  340. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/airbyte_secrets_utils.py +0 -0
  341. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/analytics_message.py +0 -0
  342. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/constants.py +0 -0
  343. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/datetime_format_inferrer.py +0 -0
  344. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/event_timing.py +0 -0
  345. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/is_cloud_environment.py +0 -0
  346. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/mapping_helpers.py +0 -0
  347. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/message_utils.py +0 -0
  348. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/oneof_option_config.py +0 -0
  349. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/print_buffer.py +0 -0
  350. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/schema_inferrer.py +0 -0
  351. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/slice_hasher.py +0 -0
  352. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/spec_schema_transformations.py +0 -0
  353. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/stream_status_utils.py +0 -0
  354. {airbyte_cdk-6.23.0 → airbyte_cdk-6.23.0.dev0}/airbyte_cdk/utils/traced_exception.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: airbyte-cdk
3
- Version: 6.23.0
3
+ Version: 6.23.0.dev0
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  License: MIT
6
6
  Keywords: airbyte,connector-development-kit,cdk
@@ -20,6 +20,9 @@ from airbyte_cdk.sources.declarative.extractors.record_filter import (
20
20
  ClientSideIncrementalRecordFilterDecorator,
21
21
  )
22
22
  from airbyte_cdk.sources.declarative.incremental.datetime_based_cursor import DatetimeBasedCursor
23
+ from airbyte_cdk.sources.declarative.incremental.per_partition_with_global import (
24
+ PerPartitionWithGlobalCursor,
25
+ )
23
26
  from airbyte_cdk.sources.declarative.interpolation import InterpolatedString
24
27
  from airbyte_cdk.sources.declarative.manifest_declarative_source import ManifestDeclarativeSource
25
28
  from airbyte_cdk.sources.declarative.models.declarative_component_schema import (
@@ -32,7 +35,7 @@ from airbyte_cdk.sources.declarative.parsers.model_to_component_factory import (
32
35
  ModelToComponentFactory,
33
36
  )
34
37
  from airbyte_cdk.sources.declarative.requesters import HttpRequester
35
- from airbyte_cdk.sources.declarative.retrievers import SimpleRetriever
38
+ from airbyte_cdk.sources.declarative.retrievers import Retriever, SimpleRetriever
36
39
  from airbyte_cdk.sources.declarative.stream_slicers.declarative_partition_generator import (
37
40
  DeclarativePartitionFactory,
38
41
  StreamSlicerPartitionGenerator,
@@ -231,21 +234,7 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
231
234
  stream_state=stream_state,
232
235
  )
233
236
 
234
- retriever = declarative_stream.retriever
235
-
236
- # This is an optimization so that we don't invoke any cursor or state management flows within the
237
- # low-code framework because state management is handled through the ConcurrentCursor.
238
- if declarative_stream and isinstance(retriever, SimpleRetriever):
239
- # Also a temporary hack. In the legacy Stream implementation, as part of the read,
240
- # set_initial_state() is called to instantiate incoming state on the cursor. Although we no
241
- # longer rely on the legacy low-code cursor for concurrent checkpointing, low-code components
242
- # like StopConditionPaginationStrategyDecorator and ClientSideIncrementalRecordFilterDecorator
243
- # still rely on a DatetimeBasedCursor that is properly initialized with state.
244
- if retriever.cursor:
245
- retriever.cursor.set_initial_state(stream_state=stream_state)
246
- # We zero it out here, but since this is a cursor reference, the state is still properly
247
- # instantiated for the other components that reference it
248
- retriever.cursor = None
237
+ retriever = self._get_retriever(declarative_stream, stream_state)
249
238
 
250
239
  partition_generator = StreamSlicerPartitionGenerator(
251
240
  DeclarativePartitionFactory(
@@ -305,6 +294,60 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
305
294
  cursor=final_state_cursor,
306
295
  )
307
296
  )
297
+ elif (
298
+ incremental_sync_component_definition
299
+ and incremental_sync_component_definition.get("type", "")
300
+ == DatetimeBasedCursorModel.__name__
301
+ and self._stream_supports_concurrent_partition_processing(
302
+ declarative_stream=declarative_stream
303
+ )
304
+ and hasattr(declarative_stream.retriever, "stream_slicer")
305
+ and isinstance(
306
+ declarative_stream.retriever.stream_slicer, PerPartitionWithGlobalCursor
307
+ )
308
+ ):
309
+ stream_state = state_manager.get_stream_state(
310
+ stream_name=declarative_stream.name, namespace=declarative_stream.namespace
311
+ )
312
+ partition_router = declarative_stream.retriever.stream_slicer._partition_router
313
+
314
+ perpartition_cursor = (
315
+ self._constructor.create_concurrent_cursor_from_perpartition_cursor(
316
+ state_manager=state_manager,
317
+ model_type=DatetimeBasedCursorModel,
318
+ component_definition=incremental_sync_component_definition,
319
+ stream_name=declarative_stream.name,
320
+ stream_namespace=declarative_stream.namespace,
321
+ config=config or {},
322
+ stream_state=stream_state,
323
+ partition_router=partition_router,
324
+ )
325
+ )
326
+
327
+ retriever = self._get_retriever(declarative_stream, stream_state)
328
+
329
+ partition_generator = StreamSlicerPartitionGenerator(
330
+ DeclarativePartitionFactory(
331
+ declarative_stream.name,
332
+ declarative_stream.get_json_schema(),
333
+ retriever,
334
+ self.message_repository,
335
+ ),
336
+ perpartition_cursor,
337
+ )
338
+
339
+ concurrent_streams.append(
340
+ DefaultStream(
341
+ partition_generator=partition_generator,
342
+ name=declarative_stream.name,
343
+ json_schema=declarative_stream.get_json_schema(),
344
+ availability_strategy=AlwaysAvailableAvailabilityStrategy(),
345
+ primary_key=get_primary_key_from_stream(declarative_stream.primary_key),
346
+ cursor_field=perpartition_cursor.cursor_field.cursor_field_key,
347
+ logger=self.logger,
348
+ cursor=perpartition_cursor,
349
+ )
350
+ )
308
351
  else:
309
352
  synchronous_streams.append(declarative_stream)
310
353
  else:
@@ -395,6 +438,27 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
395
438
  return False
396
439
  return True
397
440
 
441
+ def _get_retriever(
442
+ self, declarative_stream: DeclarativeStream, stream_state: Mapping[str, Any]
443
+ ) -> Retriever:
444
+ retriever = declarative_stream.retriever
445
+
446
+ # This is an optimization so that we don't invoke any cursor or state management flows within the
447
+ # low-code framework because state management is handled through the ConcurrentCursor.
448
+ if declarative_stream and isinstance(retriever, SimpleRetriever):
449
+ # Also a temporary hack. In the legacy Stream implementation, as part of the read,
450
+ # set_initial_state() is called to instantiate incoming state on the cursor. Although we no
451
+ # longer rely on the legacy low-code cursor for concurrent checkpointing, low-code components
452
+ # like StopConditionPaginationStrategyDecorator and ClientSideIncrementalRecordFilterDecorator
453
+ # still rely on a DatetimeBasedCursor that is properly initialized with state.
454
+ if retriever.cursor:
455
+ retriever.cursor.set_initial_state(stream_state=stream_state)
456
+ # We zero it out here, but since this is a cursor reference, the state is still properly
457
+ # instantiated for the other components that reference it
458
+ retriever.cursor = None
459
+
460
+ return retriever
461
+
398
462
  @staticmethod
399
463
  def _select_streams(
400
464
  streams: List[AbstractStream], configured_catalog: ConfiguredAirbyteCatalog
@@ -59,13 +59,11 @@ class ClientSideIncrementalRecordFilterDecorator(RecordFilter):
59
59
 
60
60
  def __init__(
61
61
  self,
62
- date_time_based_cursor: DatetimeBasedCursor,
63
- substream_cursor: Optional[Union[PerPartitionWithGlobalCursor, GlobalSubstreamCursor]],
62
+ cursor: Union[DatetimeBasedCursor, PerPartitionWithGlobalCursor, GlobalSubstreamCursor],
64
63
  **kwargs: Any,
65
64
  ):
66
65
  super().__init__(**kwargs)
67
- self._date_time_based_cursor = date_time_based_cursor
68
- self._substream_cursor = substream_cursor
66
+ self._cursor = cursor
69
67
 
70
68
  def filter_records(
71
69
  self,
@@ -77,7 +75,7 @@ class ClientSideIncrementalRecordFilterDecorator(RecordFilter):
77
75
  records = (
78
76
  record
79
77
  for record in records
80
- if (self._substream_cursor or self._date_time_based_cursor).should_be_synced(
78
+ if self._cursor.should_be_synced(
81
79
  # Record is created on the fly to align with cursors interface; stream name is ignored as we don't need it here
82
80
  # Record stream name is empty cause it is not used durig the filtering
83
81
  Record(data=record, associated_slice=stream_slice, stream_name="")
@@ -2,6 +2,10 @@
2
2
  # Copyright (c) 2022 Airbyte, Inc., all rights reserved.
3
3
  #
4
4
 
5
+ from airbyte_cdk.sources.declarative.incremental.concurrent_partition_cursor import (
6
+ ConcurrentCursorFactory,
7
+ ConcurrentPerPartitionCursor,
8
+ )
5
9
  from airbyte_cdk.sources.declarative.incremental.datetime_based_cursor import DatetimeBasedCursor
6
10
  from airbyte_cdk.sources.declarative.incremental.declarative_cursor import DeclarativeCursor
7
11
  from airbyte_cdk.sources.declarative.incremental.global_substream_cursor import (
@@ -21,6 +25,8 @@ from airbyte_cdk.sources.declarative.incremental.resumable_full_refresh_cursor i
21
25
 
22
26
  __all__ = [
23
27
  "CursorFactory",
28
+ "ConcurrentCursorFactory",
29
+ "ConcurrentPerPartitionCursor",
24
30
  "DatetimeBasedCursor",
25
31
  "DeclarativeCursor",
26
32
  "GlobalSubstreamCursor",
@@ -0,0 +1,333 @@
1
+ #
2
+ # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
+ #
4
+
5
+ import copy
6
+ import logging
7
+ import threading
8
+ from collections import OrderedDict
9
+ from copy import deepcopy
10
+ from datetime import timedelta
11
+ from typing import Any, Callable, Iterable, Mapping, MutableMapping, Optional
12
+
13
+ from airbyte_cdk.sources.connector_state_manager import ConnectorStateManager
14
+ from airbyte_cdk.sources.declarative.incremental.global_substream_cursor import (
15
+ Timer,
16
+ iterate_with_last_flag_and_state,
17
+ )
18
+ from airbyte_cdk.sources.declarative.partition_routers.partition_router import PartitionRouter
19
+ from airbyte_cdk.sources.message import MessageRepository
20
+ from airbyte_cdk.sources.streams.checkpoint.per_partition_key_serializer import (
21
+ PerPartitionKeySerializer,
22
+ )
23
+ from airbyte_cdk.sources.streams.concurrent.cursor import ConcurrentCursor, Cursor, CursorField
24
+ from airbyte_cdk.sources.streams.concurrent.partitions.partition import Partition
25
+ from airbyte_cdk.sources.types import Record, StreamSlice, StreamState
26
+
27
+ logger = logging.getLogger("airbyte")
28
+
29
+
30
+ class ConcurrentCursorFactory:
31
+ def __init__(self, create_function: Callable[..., ConcurrentCursor]):
32
+ self._create_function = create_function
33
+
34
+ def create(
35
+ self, stream_state: Mapping[str, Any], runtime_lookback_window: Optional[timedelta]
36
+ ) -> ConcurrentCursor:
37
+ return self._create_function(
38
+ stream_state=stream_state, runtime_lookback_window=runtime_lookback_window
39
+ )
40
+
41
+
42
+ class ConcurrentPerPartitionCursor(Cursor):
43
+ """
44
+ Manages state per partition when a stream has many partitions, preventing data loss or duplication.
45
+
46
+ Attributes:
47
+ DEFAULT_MAX_PARTITIONS_NUMBER (int): Maximum number of partitions to retain in memory (default is 10,000).
48
+
49
+ - **Partition Limitation Logic**
50
+ Ensures the number of tracked partitions does not exceed the specified limit to prevent memory overuse. Oldest partitions are removed when the limit is reached.
51
+
52
+ - **Global Cursor Fallback**
53
+ New partitions use global state as the initial state to progress the state for deleted or new partitions. The history data added after the initial sync will be missing.
54
+
55
+ CurrentPerPartitionCursor expects the state of the ConcurrentCursor to follow the format {cursor_field: cursor_value}.
56
+ """
57
+
58
+ DEFAULT_MAX_PARTITIONS_NUMBER = 10000
59
+ _NO_STATE: Mapping[str, Any] = {}
60
+ _NO_CURSOR_STATE: Mapping[str, Any] = {}
61
+ _GLOBAL_STATE_KEY = "state"
62
+ _PERPARTITION_STATE_KEY = "states"
63
+ _KEY = 0
64
+ _VALUE = 1
65
+
66
+ def __init__(
67
+ self,
68
+ cursor_factory: ConcurrentCursorFactory,
69
+ partition_router: PartitionRouter,
70
+ stream_name: str,
71
+ stream_namespace: Optional[str],
72
+ stream_state: Any,
73
+ message_repository: MessageRepository,
74
+ connector_state_manager: ConnectorStateManager,
75
+ cursor_field: CursorField,
76
+ ) -> None:
77
+ self._global_cursor: Optional[StreamState] = {}
78
+ self._stream_name = stream_name
79
+ self._stream_namespace = stream_namespace
80
+ self._message_repository = message_repository
81
+ self._connector_state_manager = connector_state_manager
82
+ self._cursor_field = cursor_field
83
+
84
+ self._cursor_factory = cursor_factory
85
+ self._partition_router = partition_router
86
+
87
+ # The dict is ordered to ensure that once the maximum number of partitions is reached,
88
+ # the oldest partitions can be efficiently removed, maintaining the most recent partitions.
89
+ self._cursor_per_partition: OrderedDict[str, ConcurrentCursor] = OrderedDict()
90
+ self._semaphore_per_partition: OrderedDict[str, threading.Semaphore] = OrderedDict()
91
+ self._finished_partitions: set[str] = set()
92
+ self._lock = threading.Lock()
93
+ self._timer = Timer()
94
+ self._new_global_cursor: Optional[StreamState] = None
95
+ self._lookback_window: int = 0
96
+ self._parent_state: Optional[StreamState] = None
97
+ self._over_limit: int = 0
98
+ self._partition_serializer = PerPartitionKeySerializer()
99
+
100
+ self._set_initial_state(stream_state)
101
+
102
+ @property
103
+ def cursor_field(self) -> CursorField:
104
+ return self._cursor_field
105
+
106
+ @property
107
+ def state(self) -> MutableMapping[str, Any]:
108
+ states = []
109
+ for partition_tuple, cursor in self._cursor_per_partition.items():
110
+ if cursor.state:
111
+ states.append(
112
+ {
113
+ "partition": self._to_dict(partition_tuple),
114
+ "cursor": copy.deepcopy(cursor.state),
115
+ }
116
+ )
117
+ state: dict[str, Any] = {self._PERPARTITION_STATE_KEY: states}
118
+
119
+ if self._global_cursor:
120
+ state[self._GLOBAL_STATE_KEY] = self._global_cursor
121
+ if self._lookback_window is not None:
122
+ state["lookback_window"] = self._lookback_window
123
+ if self._parent_state is not None:
124
+ state["parent_state"] = self._parent_state
125
+ return state
126
+
127
+ def close_partition(self, partition: Partition) -> None:
128
+ # Attempt to retrieve the stream slice
129
+ stream_slice: Optional[StreamSlice] = partition.to_slice() # type: ignore[assignment]
130
+
131
+ # Ensure stream_slice is not None
132
+ if stream_slice is None:
133
+ raise ValueError("stream_slice cannot be None")
134
+
135
+ partition_key = self._to_partition_key(stream_slice.partition)
136
+ self._cursor_per_partition[partition_key].close_partition(partition=partition)
137
+ with self._lock:
138
+ self._semaphore_per_partition[partition_key].acquire()
139
+ cursor = self._cursor_per_partition[partition_key]
140
+ if (
141
+ partition_key in self._finished_partitions
142
+ and self._semaphore_per_partition[partition_key]._value == 0
143
+ ):
144
+ if (
145
+ self._new_global_cursor is None
146
+ or self._new_global_cursor[self.cursor_field.cursor_field_key]
147
+ < cursor.state[self.cursor_field.cursor_field_key]
148
+ ):
149
+ self._new_global_cursor = copy.deepcopy(cursor.state)
150
+
151
+ def ensure_at_least_one_state_emitted(self) -> None:
152
+ """
153
+ The platform expect to have at least one state message on successful syncs. Hence, whatever happens, we expect this method to be
154
+ called.
155
+ """
156
+ if not any(
157
+ semaphore_item[1]._value for semaphore_item in self._semaphore_per_partition.items()
158
+ ):
159
+ self._global_cursor = self._new_global_cursor
160
+ self._lookback_window = self._timer.finish()
161
+ self._parent_state = self._partition_router.get_stream_state()
162
+ self._emit_state_message()
163
+
164
+ def _emit_state_message(self) -> None:
165
+ self._connector_state_manager.update_state_for_stream(
166
+ self._stream_name,
167
+ self._stream_namespace,
168
+ self.state,
169
+ )
170
+ state_message = self._connector_state_manager.create_state_message(
171
+ self._stream_name, self._stream_namespace
172
+ )
173
+ self._message_repository.emit_message(state_message)
174
+
175
+ def stream_slices(self) -> Iterable[StreamSlice]:
176
+ if self._timer.is_running():
177
+ raise RuntimeError("stream_slices has been executed more than once.")
178
+
179
+ slices = self._partition_router.stream_slices()
180
+ self._timer.start()
181
+ for partition in slices:
182
+ yield from self._generate_slices_from_partition(partition)
183
+
184
+ def _generate_slices_from_partition(self, partition: StreamSlice) -> Iterable[StreamSlice]:
185
+ # Ensure the maximum number of partitions is not exceeded
186
+ self._ensure_partition_limit()
187
+
188
+ cursor = self._cursor_per_partition.get(self._to_partition_key(partition.partition))
189
+ if not cursor:
190
+ cursor = self._create_cursor(
191
+ self._global_cursor,
192
+ self._lookback_window if self._global_cursor else 0,
193
+ )
194
+ self._cursor_per_partition[self._to_partition_key(partition.partition)] = cursor
195
+ self._semaphore_per_partition[self._to_partition_key(partition.partition)] = (
196
+ threading.Semaphore(0)
197
+ )
198
+
199
+ for cursor_slice, is_last_slice, _ in iterate_with_last_flag_and_state(
200
+ cursor.stream_slices(),
201
+ lambda: None,
202
+ ):
203
+ self._semaphore_per_partition[self._to_partition_key(partition.partition)].release()
204
+ if is_last_slice:
205
+ self._finished_partitions.add(self._to_partition_key(partition.partition))
206
+ yield StreamSlice(
207
+ partition=partition, cursor_slice=cursor_slice, extra_fields=partition.extra_fields
208
+ )
209
+
210
+ def _ensure_partition_limit(self) -> None:
211
+ """
212
+ Ensure the maximum number of partitions is not exceeded. If so, the oldest added partition will be dropped.
213
+ """
214
+ while len(self._cursor_per_partition) > self.DEFAULT_MAX_PARTITIONS_NUMBER - 1:
215
+ self._over_limit += 1
216
+ oldest_partition = self._cursor_per_partition.popitem(last=False)[
217
+ 0
218
+ ] # Remove the oldest partition
219
+ logger.warning(
220
+ f"The maximum number of partitions has been reached. Dropping the oldest partition: {oldest_partition}. Over limit: {self._over_limit}."
221
+ )
222
+
223
+ def _set_initial_state(self, stream_state: StreamState) -> None:
224
+ """
225
+ Initialize the cursor's state using the provided `stream_state`.
226
+
227
+ This method supports global and per-partition state initialization.
228
+
229
+ - **Global State**: If `states` is missing, the `state` is treated as global and applied to all partitions.
230
+ The `global state` holds a single cursor position representing the latest processed record across all partitions.
231
+
232
+ - **Lookback Window**: Configured via `lookback_window`, it defines the period (in seconds) for reprocessing records.
233
+ This ensures robustness in case of upstream data delays or reordering. If not specified, it defaults to 0.
234
+
235
+ - **Per-Partition State**: If `states` is present, each partition's cursor state is initialized separately.
236
+
237
+ - **Parent State**: (if available) Used to initialize partition routers based on parent streams.
238
+
239
+ Args:
240
+ stream_state (StreamState): The state of the streams to be set. The format of the stream state should be:
241
+ {
242
+ "states": [
243
+ {
244
+ "partition": {
245
+ "partition_key": "value"
246
+ },
247
+ "cursor": {
248
+ "last_updated": "2023-05-27T00:00:00Z"
249
+ }
250
+ }
251
+ ],
252
+ "state": {
253
+ "last_updated": "2023-05-27T00:00:00Z"
254
+ },
255
+ lookback_window: 10,
256
+ "parent_state": {
257
+ "parent_stream_name": {
258
+ "last_updated": "2023-05-27T00:00:00Z"
259
+ }
260
+ }
261
+ }
262
+ """
263
+ if not stream_state:
264
+ return
265
+
266
+ if self._PERPARTITION_STATE_KEY not in stream_state:
267
+ # We assume that `stream_state` is in a global format that can be applied to all partitions.
268
+ # Example: {"global_state_format_key": "global_state_format_value"}
269
+ self._global_cursor = deepcopy(stream_state)
270
+ self._new_global_cursor = deepcopy(stream_state)
271
+
272
+ else:
273
+ self._lookback_window = int(stream_state.get("lookback_window", 0))
274
+
275
+ for state in stream_state[self._PERPARTITION_STATE_KEY]:
276
+ self._cursor_per_partition[self._to_partition_key(state["partition"])] = (
277
+ self._create_cursor(state["cursor"])
278
+ )
279
+ self._semaphore_per_partition[self._to_partition_key(state["partition"])] = (
280
+ threading.Semaphore(0)
281
+ )
282
+
283
+ # set default state for missing partitions if it is per partition with fallback to global
284
+ if self._GLOBAL_STATE_KEY in stream_state:
285
+ self._global_cursor = deepcopy(stream_state[self._GLOBAL_STATE_KEY])
286
+ self._new_global_cursor = deepcopy(stream_state[self._GLOBAL_STATE_KEY])
287
+
288
+ # Set initial parent state
289
+ if stream_state.get("parent_state"):
290
+ self._parent_state = stream_state["parent_state"]
291
+
292
+ # Set parent state for partition routers based on parent streams
293
+ self._partition_router.set_initial_state(stream_state)
294
+
295
+ def observe(self, record: Record) -> None:
296
+ if not record.associated_slice:
297
+ raise ValueError(
298
+ "Invalid state as stream slices that are emitted should refer to an existing cursor"
299
+ )
300
+ self._cursor_per_partition[
301
+ self._to_partition_key(record.associated_slice.partition)
302
+ ].observe(record)
303
+
304
+ def _to_partition_key(self, partition: Mapping[str, Any]) -> str:
305
+ return self._partition_serializer.to_partition_key(partition)
306
+
307
+ def _to_dict(self, partition_key: str) -> Mapping[str, Any]:
308
+ return self._partition_serializer.to_partition(partition_key)
309
+
310
+ def _create_cursor(
311
+ self, cursor_state: Any, runtime_lookback_window: int = 0
312
+ ) -> ConcurrentCursor:
313
+ cursor = self._cursor_factory.create(
314
+ stream_state=deepcopy(cursor_state),
315
+ runtime_lookback_window=timedelta(seconds=runtime_lookback_window),
316
+ )
317
+ return cursor
318
+
319
+ def should_be_synced(self, record: Record) -> bool:
320
+ return self._get_cursor(record).should_be_synced(record)
321
+
322
+ def _get_cursor(self, record: Record) -> ConcurrentCursor:
323
+ if not record.associated_slice:
324
+ raise ValueError(
325
+ "Invalid state as stream slices that are emitted should refer to an existing cursor"
326
+ )
327
+ partition_key = self._to_partition_key(record.associated_slice.partition)
328
+ if partition_key not in self._cursor_per_partition:
329
+ raise ValueError(
330
+ "Invalid state as stream slices that are emitted should refer to an existing cursor"
331
+ )
332
+ cursor = self._cursor_per_partition[partition_key]
333
+ return cursor
@@ -64,6 +64,9 @@ class Timer:
64
64
  else:
65
65
  raise RuntimeError("Global substream cursor timer not started")
66
66
 
67
+ def is_running(self) -> bool:
68
+ return self._start is not None
69
+
67
70
 
68
71
  class GlobalSubstreamCursor(DeclarativeCursor):
69
72
  """
@@ -303,6 +303,21 @@ class PerPartitionCursor(DeclarativeCursor):
303
303
  raise ValueError("A partition needs to be provided in order to get request body json")
304
304
 
305
305
  def should_be_synced(self, record: Record) -> bool:
306
+ if (
307
+ record.associated_slice
308
+ and self._to_partition_key(record.associated_slice.partition)
309
+ not in self._cursor_per_partition
310
+ ):
311
+ partition_state = (
312
+ self._state_to_migrate_from
313
+ if self._state_to_migrate_from
314
+ else self._NO_CURSOR_STATE
315
+ )
316
+ cursor = self._create_cursor(partition_state)
317
+
318
+ self._cursor_per_partition[
319
+ self._to_partition_key(record.associated_slice.partition)
320
+ ] = cursor
306
321
  return self._get_cursor(record).should_be_synced(
307
322
  self._convert_record_to_cursor_record(record)
308
323
  )