airbyte-cdk 6.54.5__py3-none-any.whl → 6.54.6.post3.dev16455371449__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.

Potentially problematic release.


This version of airbyte-cdk might be problematic. Click here for more details.

@@ -89,6 +89,7 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
89
89
  emit_connector_builder_messages=emit_connector_builder_messages,
90
90
  disable_resumable_full_refresh=True,
91
91
  connector_state_manager=self._connector_state_manager,
92
+ max_concurrent_async_job_count=source_config.get("max_concurrent_async_job_count"),
92
93
  )
93
94
 
94
95
  super().__init__(
@@ -4276,6 +4276,16 @@ definitions:
4276
4276
  description: The condition that the specified config value will be evaluated against
4277
4277
  anyOf:
4278
4278
  - "$ref": "#/definitions/ValidateAdheresToSchema"
4279
+ condition:
4280
+ title: Condition
4281
+ description: The condition which will determine if the validation strategy will be applied.
4282
+ type: string
4283
+ interpolation_context:
4284
+ - config
4285
+ default: ""
4286
+ examples:
4287
+ - "{{ config.get('dimensions', False) }}"
4288
+ - "{{ config.get('custom_reports', [{}])[0].get('dimensions', [])|length > 0 }}"
4279
4289
  PredicateValidator:
4280
4290
  title: Predicate Validator
4281
4291
  description: Validator that applies a validation strategy to a specified value.
@@ -4310,6 +4320,16 @@ definitions:
4310
4320
  description: The validation strategy to apply to the value.
4311
4321
  anyOf:
4312
4322
  - "$ref": "#/definitions/ValidateAdheresToSchema"
4323
+ condition:
4324
+ title: Condition
4325
+ description: The condition which will determine if the validation strategy will be applied.
4326
+ type: string
4327
+ interpolation_context:
4328
+ - config
4329
+ default: ""
4330
+ examples:
4331
+ - "{{ config.get('dimensions', False) }}"
4332
+ - "{{ config.get('custom_reports', [{}])[0].get('dimensions', [])|length > 0 }}"
4313
4333
  ValidateAdheresToSchema:
4314
4334
  title: Validate Adheres To Schema
4315
4335
  description: Validates that a user-provided schema adheres to a specified JSON schema.
@@ -1,3 +1,5 @@
1
+ # Copyright (c) 2025 Airbyte, Inc., all rights reserved.
2
+
1
3
  # generated by datamodel-codegen:
2
4
  # filename: declarative_component_schema.yaml
3
5
 
@@ -2008,6 +2010,15 @@ class DpathValidator(BaseModel):
2008
2010
  description="The condition that the specified config value will be evaluated against",
2009
2011
  title="Validation Strategy",
2010
2012
  )
2013
+ condition: Optional[str] = Field(
2014
+ "",
2015
+ description="The condition which will determine if the validation strategy will be applied.",
2016
+ examples=[
2017
+ "{{ config.get('dimensions', False) }}",
2018
+ "{{ config.get('custom_reports', [{}])[0].get('dimensions', [])|length > 0 }}",
2019
+ ],
2020
+ title="Condition",
2021
+ )
2011
2022
 
2012
2023
 
2013
2024
  class PredicateValidator(BaseModel):
@@ -2028,6 +2039,15 @@ class PredicateValidator(BaseModel):
2028
2039
  description="The validation strategy to apply to the value.",
2029
2040
  title="Validation Strategy",
2030
2041
  )
2042
+ condition: Optional[str] = Field(
2043
+ "",
2044
+ description="The condition which will determine if the validation strategy will be applied.",
2045
+ examples=[
2046
+ "{{ config.get('dimensions', False) }}",
2047
+ "{{ config.get('custom_reports', [{}])[0].get('dimensions', [])|length > 0 }}",
2048
+ ],
2049
+ title="Condition",
2050
+ )
2031
2051
 
2032
2052
 
2033
2053
  class ConfigAddFields(BaseModel):
@@ -869,20 +869,26 @@ class ModelToComponentFactory:
869
869
 
870
870
  def create_dpath_validator(self, model: DpathValidatorModel, config: Config) -> DpathValidator:
871
871
  strategy = self._create_component_from_model(model.validation_strategy, config)
872
+ condition = model.condition or ""
872
873
 
873
874
  return DpathValidator(
874
875
  field_path=model.field_path,
875
876
  strategy=strategy,
877
+ config=config,
878
+ condition=condition,
876
879
  )
877
880
 
878
881
  def create_predicate_validator(
879
882
  self, model: PredicateValidatorModel, config: Config
880
883
  ) -> PredicateValidator:
881
884
  strategy = self._create_component_from_model(model.validation_strategy, config)
885
+ condition = model.condition or ""
882
886
 
883
887
  return PredicateValidator(
884
888
  value=model.value,
885
889
  strategy=strategy,
890
+ config=config,
891
+ condition=condition,
886
892
  )
887
893
 
888
894
  @staticmethod
@@ -7,9 +7,11 @@ from typing import Any, List, Union
7
7
 
8
8
  import dpath.util
9
9
 
10
+ from airbyte_cdk.sources.declarative.interpolation.interpolated_boolean import InterpolatedBoolean
10
11
  from airbyte_cdk.sources.declarative.interpolation.interpolated_string import InterpolatedString
11
12
  from airbyte_cdk.sources.declarative.validators.validation_strategy import ValidationStrategy
12
13
  from airbyte_cdk.sources.declarative.validators.validator import Validator
14
+ from airbyte_cdk.sources.types import Config
13
15
 
14
16
 
15
17
  @dataclass
@@ -21,8 +23,12 @@ class DpathValidator(Validator):
21
23
 
22
24
  field_path: List[str]
23
25
  strategy: ValidationStrategy
26
+ config: Config
27
+ condition: str
24
28
 
25
29
  def __post_init__(self) -> None:
30
+ self._interpolated_condition = InterpolatedBoolean(condition=self.condition, parameters={})
31
+
26
32
  self._field_path = [
27
33
  InterpolatedString.create(path, parameters={}) for path in self.field_path
28
34
  ]
@@ -39,6 +45,9 @@ class DpathValidator(Validator):
39
45
  :param input_data: Dictionary containing the data to validate
40
46
  :raises ValueError: If the path doesn't exist or validation fails
41
47
  """
48
+ if self.condition and not self._interpolated_condition.eval(self.config):
49
+ return
50
+
42
51
  path = [path.eval({}) for path in self._field_path]
43
52
 
44
53
  if len(path) == 0:
@@ -5,7 +5,9 @@
5
5
  from dataclasses import dataclass
6
6
  from typing import Any
7
7
 
8
+ from airbyte_cdk.sources.declarative.interpolation.interpolated_boolean import InterpolatedBoolean
8
9
  from airbyte_cdk.sources.declarative.validators.validation_strategy import ValidationStrategy
10
+ from airbyte_cdk.sources.types import Config
9
11
 
10
12
 
11
13
  @dataclass
@@ -16,6 +18,11 @@ class PredicateValidator:
16
18
 
17
19
  value: Any
18
20
  strategy: ValidationStrategy
21
+ config: Config
22
+ condition: str
23
+
24
+ def __post_init__(self) -> None:
25
+ self._interpolated_condition = InterpolatedBoolean(condition=self.condition, parameters={})
19
26
 
20
27
  def validate(self) -> None:
21
28
  """
@@ -23,4 +30,7 @@ class PredicateValidator:
23
30
 
24
31
  :raises ValueError: If validation fails
25
32
  """
33
+ if self.condition and not self._interpolated_condition.eval(self.config):
34
+ return
35
+
26
36
  self.strategy.validate(self.value)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 6.54.5
3
+ Version: 6.54.6.post3.dev16455371449
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -85,11 +85,11 @@ airbyte_cdk/sources/declarative/checks/check_stream.py,sha256=QeExVmpSYjr_CnghHu
85
85
  airbyte_cdk/sources/declarative/checks/connection_checker.py,sha256=MBRJo6WJlZQHpIfOGaNOkkHUmgUl_4wDM6VPo41z5Ss,1383
86
86
  airbyte_cdk/sources/declarative/concurrency_level/__init__.py,sha256=5XUqrmlstYlMM0j6crktlKQwALek0uiz2D3WdM46MyA,191
87
87
  airbyte_cdk/sources/declarative/concurrency_level/concurrency_level.py,sha256=YIwCTCpOr_QSNW4ltQK0yUGWInI8PKNY216HOOegYLk,2101
88
- airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=OKor1mDDdJZz8kgiR0KI-_pWDjCF1nuDcto_fSYerW4,28442
88
+ airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=rgCbaMkXN6QlblyK3mIVwdLtBtCo_IYRYOmjDGa0jwg,28538
89
89
  airbyte_cdk/sources/declarative/datetime/__init__.py,sha256=4Hw-PX1-VgESLF16cDdvuYCzGJtHntThLF4qIiULWeo,61
90
90
  airbyte_cdk/sources/declarative/datetime/datetime_parser.py,sha256=_zGNGq31RNy_0QBLt_EcTvgPyhj7urPdx6oA3M5-r3o,3150
91
91
  airbyte_cdk/sources/declarative/datetime/min_max_datetime.py,sha256=0BHBtDNQZfvwM45-tY5pNlTcKAFSGGNxemoi0Jic-0E,5785
92
- airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=3K4hGCyqpOMhfLqwS6brufHVx-IypmxDMiCxH1ywusg,177473
92
+ airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=TDogT8MC2Do4DL7F7AbI2jTVlK5oWB-FqoP4rDP9dHM,178261
93
93
  airbyte_cdk/sources/declarative/declarative_source.py,sha256=qmyMnnet92eGc3C22yBtpvD5UZjqdhsAafP_zxI5wp8,1814
94
94
  airbyte_cdk/sources/declarative/declarative_stream.py,sha256=dCRlddBUSaJmBNBz1pSO1r2rTw8AP5d2_vlmIeGs2gg,10767
95
95
  airbyte_cdk/sources/declarative/decoders/__init__.py,sha256=JHb_0d3SE6kNY10mxA5YBEKPeSbsWYjByq1gUQxepoE,953
@@ -133,14 +133,14 @@ airbyte_cdk/sources/declarative/migrations/legacy_to_per_partition_state_migrati
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
136
- airbyte_cdk/sources/declarative/models/declarative_component_schema.py,sha256=ikMY2-Q1d19mzVjtqW7XeMtXNSsG4lvZexXR5XlIhfo,125817
136
+ airbyte_cdk/sources/declarative/models/declarative_component_schema.py,sha256=a_qTXwkG1REhdaSY69LNJaEDY8zlYhl2QNYVceyXGX4,126595
137
137
  airbyte_cdk/sources/declarative/parsers/__init__.py,sha256=ZnqYNxHsKCgO38IwB34RQyRMXTs4GTvlRi3ImKnIioo,61
138
138
  airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py,sha256=nlVvHC511NUyDEEIRBkoeDTAvLqKNp-hRy8D19z8tdk,5941
139
139
  airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=wnRUP0Xeru9Rbu5OexXSDN9QWDo8YU4tT9M2LDVOgGA,802
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=VEEJeMbOYmPNX2S8KfsWWzU_VaXM-X5_hNsosv_L5AM,175305
143
+ airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=4st9wyN_ABedI1FCFjMZaQlvDIqvaQiIlL_zCCHMjyY,175509
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
@@ -237,8 +237,8 @@ airbyte_cdk/sources/declarative/transformations/remove_fields.py,sha256=EwUP0SZ2
237
237
  airbyte_cdk/sources/declarative/transformations/transformation.py,sha256=4sXtx9cNY2EHUPq-xHvDs8GQEBUy3Eo6TkRLKHPXx68,1161
238
238
  airbyte_cdk/sources/declarative/types.py,sha256=yqx0xlZv_76tkC7fqJKefmvl4GJJ8mXbeddwVV8XRJU,778
239
239
  airbyte_cdk/sources/declarative/validators/__init__.py,sha256=_xccLn4QKQqR3CAwmCVOA7l6QuJd_Isoh6NsR8crM2U,663
240
- airbyte_cdk/sources/declarative/validators/dpath_validator.py,sha256=BF1KR20RWew_wPV3rDmXPOGO8QWZLZu7u5ubbNO1Hgo,2099
241
- airbyte_cdk/sources/declarative/validators/predicate_validator.py,sha256=Q4eVnclk1vYPvVF7XROG4MFEVkPYbYKEF8SUKs7P7-k,582
240
+ airbyte_cdk/sources/declarative/validators/dpath_validator.py,sha256=I0md_j29veQcnFP9ek0XGFHzHOHWHPHX9GdMbAFEIHc,2484
241
+ airbyte_cdk/sources/declarative/validators/predicate_validator.py,sha256=mG0NnVQSozif79qAXF1tS2iH-0CI-46DfWpc8eDIPo8,1004
242
242
  airbyte_cdk/sources/declarative/validators/validate_adheres_to_schema.py,sha256=kjcuKxWMJEzpF4GiESITGMxBAXw6YZCAsgOQMgeBo4g,1085
243
243
  airbyte_cdk/sources/declarative/validators/validation_strategy.py,sha256=LwqUX89cFdHTM1-h6c8vebBA9WC38HYoGBvJfCZHr0g,467
244
244
  airbyte_cdk/sources/declarative/validators/validator.py,sha256=MAwo8OievUsuzBuPxI9pbPu87yq0tJZkGbydcrHZyQc,382
@@ -420,9 +420,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
420
420
  airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
421
421
  airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
422
422
  airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
423
- airbyte_cdk-6.54.5.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
424
- airbyte_cdk-6.54.5.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
425
- airbyte_cdk-6.54.5.dist-info/METADATA,sha256=OL9xVCri-VK7C2XgcJXg6avbZpHAeYy9SdHp0oDof4M,6343
426
- airbyte_cdk-6.54.5.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
427
- airbyte_cdk-6.54.5.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
428
- airbyte_cdk-6.54.5.dist-info/RECORD,,
423
+ airbyte_cdk-6.54.6.post3.dev16455371449.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
424
+ airbyte_cdk-6.54.6.post3.dev16455371449.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
425
+ airbyte_cdk-6.54.6.post3.dev16455371449.dist-info/METADATA,sha256=qIkzE-VdDQlyrFfCS9Y5Knr-kH5zZBzBBLFwR6YXyP0,6364
426
+ airbyte_cdk-6.54.6.post3.dev16455371449.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
427
+ airbyte_cdk-6.54.6.post3.dev16455371449.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
428
+ airbyte_cdk-6.54.6.post3.dev16455371449.dist-info/RECORD,,