airbyte-cdk 6.56.3.post9.dev15860651667__py3-none-any.whl → 6.56.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airbyte_cdk/sources/declarative/declarative_component_schema.yaml +0 -13
- airbyte_cdk/sources/declarative/models/declarative_component_schema.py +2 -7
- airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +0 -11
- airbyte_cdk/sources/declarative/transformations/config_transformations/remap_field.py +1 -1
- airbyte_cdk/sources/declarative/validators/__init__.py +0 -4
- {airbyte_cdk-6.56.3.post9.dev15860651667.dist-info → airbyte_cdk-6.56.4.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.56.3.post9.dev15860651667.dist-info → airbyte_cdk-6.56.4.dist-info}/RECORD +11 -12
- airbyte_cdk/sources/declarative/validators/validate_in_line_condition.py +0 -43
- {airbyte_cdk-6.56.3.post9.dev15860651667.dist-info → airbyte_cdk-6.56.4.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.56.3.post9.dev15860651667.dist-info → airbyte_cdk-6.56.4.dist-info}/LICENSE_SHORT +0 -0
- {airbyte_cdk-6.56.3.post9.dev15860651667.dist-info → airbyte_cdk-6.56.4.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.56.3.post9.dev15860651667.dist-info → airbyte_cdk-6.56.4.dist-info}/entry_points.txt +0 -0
@@ -4355,7 +4355,6 @@ definitions:
|
|
4355
4355
|
description: The condition that the specified config value will be evaluated against
|
4356
4356
|
anyOf:
|
4357
4357
|
- "$ref": "#/definitions/ValidateAdheresToSchema"
|
4358
|
-
- "$ref": "#/definitions/ValidateInLineCondition"
|
4359
4358
|
PredicateValidator:
|
4360
4359
|
title: Predicate Validator
|
4361
4360
|
description: Validator that applies a validation strategy to a specified value.
|
@@ -4384,24 +4383,12 @@ definitions:
|
|
4384
4383
|
- "test-value"
|
4385
4384
|
- "{{ config['api_version'] }}"
|
4386
4385
|
- "{{ config['tenant_id'] }}"
|
4387
|
-
- "{{ config['start_date'] < now_utc() }}"
|
4388
4386
|
- 123
|
4389
4387
|
validation_strategy:
|
4390
4388
|
title: Validation Strategy
|
4391
4389
|
description: The validation strategy to apply to the value.
|
4392
4390
|
anyOf:
|
4393
4391
|
- "$ref": "#/definitions/ValidateAdheresToSchema"
|
4394
|
-
- "$ref": "#/definitions/ValidateInLineCondition"
|
4395
|
-
ValidateInLineCondition:
|
4396
|
-
title: Validate In Line Condition
|
4397
|
-
description: Validation strategy that evaluates the value as an InterpolatedBoolean.
|
4398
|
-
type: object
|
4399
|
-
required:
|
4400
|
-
- type
|
4401
|
-
properties:
|
4402
|
-
type:
|
4403
|
-
type: string
|
4404
|
-
enum: [ValidateInLineCondition]
|
4405
4392
|
ValidateAdheresToSchema:
|
4406
4393
|
title: Validate Adheres To Schema
|
4407
4394
|
description: Validates that a user-provided schema adheres to a specified JSON schema.
|
@@ -1559,10 +1559,6 @@ class RequestBodyGraphQlQuery(BaseModel):
|
|
1559
1559
|
query: Dict[str, Any] = Field(..., description="The GraphQL query to be executed")
|
1560
1560
|
|
1561
1561
|
|
1562
|
-
class ValidateInLineCondition(BaseModel):
|
1563
|
-
type: Literal["ValidateInLineCondition"]
|
1564
|
-
|
1565
|
-
|
1566
1562
|
class ValidateAdheresToSchema(BaseModel):
|
1567
1563
|
type: Literal["ValidateAdheresToSchema"]
|
1568
1564
|
base_schema: Union[str, Dict[str, Any]] = Field(
|
@@ -2034,7 +2030,7 @@ class DpathValidator(BaseModel):
|
|
2034
2030
|
],
|
2035
2031
|
title="Field Path",
|
2036
2032
|
)
|
2037
|
-
validation_strategy:
|
2033
|
+
validation_strategy: ValidateAdheresToSchema = Field(
|
2038
2034
|
...,
|
2039
2035
|
description="The condition that the specified config value will be evaluated against",
|
2040
2036
|
title="Validation Strategy",
|
@@ -2050,12 +2046,11 @@ class PredicateValidator(BaseModel):
|
|
2050
2046
|
"test-value",
|
2051
2047
|
"{{ config['api_version'] }}",
|
2052
2048
|
"{{ config['tenant_id'] }}",
|
2053
|
-
"{{ config['start_date'] < now_utc() }}",
|
2054
2049
|
123,
|
2055
2050
|
],
|
2056
2051
|
title="Value",
|
2057
2052
|
)
|
2058
|
-
validation_strategy:
|
2053
|
+
validation_strategy: ValidateAdheresToSchema = Field(
|
2059
2054
|
...,
|
2060
2055
|
description="The validation strategy to apply to the value.",
|
2061
2056
|
title="Validation Strategy",
|
@@ -427,9 +427,6 @@ from airbyte_cdk.sources.declarative.models.declarative_component_schema import
|
|
427
427
|
from airbyte_cdk.sources.declarative.models.declarative_component_schema import (
|
428
428
|
ValidateAdheresToSchema as ValidateAdheresToSchemaModel,
|
429
429
|
)
|
430
|
-
from airbyte_cdk.sources.declarative.models.declarative_component_schema import (
|
431
|
-
ValidateInLineCondition as ValidateInLineConditionModel,
|
432
|
-
)
|
433
430
|
from airbyte_cdk.sources.declarative.models.declarative_component_schema import ValueType
|
434
431
|
from airbyte_cdk.sources.declarative.models.declarative_component_schema import (
|
435
432
|
WaitTimeFromHeader as WaitTimeFromHeaderModel,
|
@@ -575,7 +572,6 @@ from airbyte_cdk.sources.declarative.validators import (
|
|
575
572
|
DpathValidator,
|
576
573
|
PredicateValidator,
|
577
574
|
ValidateAdheresToSchema,
|
578
|
-
ValidateInLineCondition,
|
579
575
|
)
|
580
576
|
from airbyte_cdk.sources.http_logger import format_http_message
|
581
577
|
from airbyte_cdk.sources.message import (
|
@@ -742,7 +738,6 @@ class ModelToComponentFactory:
|
|
742
738
|
SpecModel: self.create_spec,
|
743
739
|
SubstreamPartitionRouterModel: self.create_substream_partition_router,
|
744
740
|
ValidateAdheresToSchemaModel: self.create_validate_adheres_to_schema,
|
745
|
-
ValidateInLineConditionModel: self.create_validate_in_line_condition,
|
746
741
|
WaitTimeFromHeaderModel: self.create_wait_time_from_header,
|
747
742
|
WaitUntilTimeFromHeaderModel: self.create_wait_until_time_from_header,
|
748
743
|
AsyncRetrieverModel: self.create_async_retriever,
|
@@ -905,12 +900,6 @@ class ModelToComponentFactory:
|
|
905
900
|
schema=base_schema,
|
906
901
|
)
|
907
902
|
|
908
|
-
@staticmethod
|
909
|
-
def create_validate_in_line_condition(
|
910
|
-
model: ValidateInLineConditionModel, config: Config, **kwargs: Any
|
911
|
-
) -> ValidateInLineCondition:
|
912
|
-
return ValidateInLineCondition(config=config)
|
913
|
-
|
914
903
|
@staticmethod
|
915
904
|
def create_added_field_definition(
|
916
905
|
model: AddedFieldDefinitionModel, config: Config, **kwargs: Any
|
@@ -59,7 +59,7 @@ class ConfigRemapField(ConfigTransformation):
|
|
59
59
|
|
60
60
|
field_name = path_components[-1]
|
61
61
|
|
62
|
-
mapping = self._map.eval(config=self.config)
|
62
|
+
mapping = self._map.eval(config=self.config or config)
|
63
63
|
|
64
64
|
if field_name in current and current[field_name] in mapping:
|
65
65
|
current[field_name] = mapping[current[field_name]]
|
@@ -7,9 +7,6 @@ from airbyte_cdk.sources.declarative.validators.predicate_validator import Predi
|
|
7
7
|
from airbyte_cdk.sources.declarative.validators.validate_adheres_to_schema import (
|
8
8
|
ValidateAdheresToSchema,
|
9
9
|
)
|
10
|
-
from airbyte_cdk.sources.declarative.validators.validate_in_line_condition import (
|
11
|
-
ValidateInLineCondition,
|
12
|
-
)
|
13
10
|
from airbyte_cdk.sources.declarative.validators.validation_strategy import ValidationStrategy
|
14
11
|
from airbyte_cdk.sources.declarative.validators.validator import Validator
|
15
12
|
|
@@ -19,5 +16,4 @@ __all__ = [
|
|
19
16
|
"ValidationStrategy",
|
20
17
|
"ValidateAdheresToSchema",
|
21
18
|
"PredicateValidator",
|
22
|
-
"ValidateInLineCondition",
|
23
19
|
]
|
@@ -89,7 +89,7 @@ airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=rQz9gXp3
|
|
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=
|
92
|
+
airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=JwWxM_QAIC7jAOYQMpo9fWa1aULtGhMn9Tg0bntoM58,180321
|
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
|
136
|
+
airbyte_cdk/sources/declarative/models/declarative_component_schema.py,sha256=jipvV9xV_BB4-IGjdUolbY3IoaB0VPubWoCtnr1Ick0,127459
|
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=
|
143
|
+
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=Sr8LrlLl61eQTsJ5b8eWt3ESCPDEpJRd6DXS4P53hVE,176635
|
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
|
@@ -227,7 +227,7 @@ airbyte_cdk/sources/declarative/transformations/add_fields.py,sha256=Eg1jQtRObgz
|
|
227
227
|
airbyte_cdk/sources/declarative/transformations/config_transformations/__init__.py,sha256=GaU3ezFa5opeDgdlNohX6TXsWJlOD2jOfJXQWeQCh7E,263
|
228
228
|
airbyte_cdk/sources/declarative/transformations/config_transformations/add_fields.py,sha256=pP9Er3CI0xbHhQDIDsDSg9TwhuL14wamcMXUY5pdc9g,3902
|
229
229
|
airbyte_cdk/sources/declarative/transformations/config_transformations/config_transformation.py,sha256=vh-NAe6-1H77tYP6MrH4qz_fxCDgoYoi1YlbT1yScrA,629
|
230
|
-
airbyte_cdk/sources/declarative/transformations/config_transformations/remap_field.py,sha256=
|
230
|
+
airbyte_cdk/sources/declarative/transformations/config_transformations/remap_field.py,sha256=_K1lnDKr4GNI540fPmbIP8_TNK-XzgMwtKh4X-I7Rrs,2370
|
231
231
|
airbyte_cdk/sources/declarative/transformations/config_transformations/remove_fields.py,sha256=mIoGM4fywxdlhdNAWHRfQbzOcP7rCdGEn7Yu8jDN1dY,2316
|
232
232
|
airbyte_cdk/sources/declarative/transformations/dpath_flatten_fields.py,sha256=DO_zR2TqlvLTRO0c572xrleI4V-1QWVOEhbenGXVMLc,3811
|
233
233
|
airbyte_cdk/sources/declarative/transformations/flatten_fields.py,sha256=yT3owG6rMKaRX-LJ_T-jSTnh1B5NoAHyH4YZN9yOvE8,1758
|
@@ -237,11 +237,10 @@ airbyte_cdk/sources/declarative/transformations/keys_to_snake_transformation.py,
|
|
237
237
|
airbyte_cdk/sources/declarative/transformations/remove_fields.py,sha256=EwUP0SZ2p4GRJ6Q8CUzlz9dcUeEidEFDlI2IBye2tlc,2745
|
238
238
|
airbyte_cdk/sources/declarative/transformations/transformation.py,sha256=4sXtx9cNY2EHUPq-xHvDs8GQEBUy3Eo6TkRLKHPXx68,1161
|
239
239
|
airbyte_cdk/sources/declarative/types.py,sha256=yqx0xlZv_76tkC7fqJKefmvl4GJJ8mXbeddwVV8XRJU,778
|
240
|
-
airbyte_cdk/sources/declarative/validators/__init__.py,sha256=
|
240
|
+
airbyte_cdk/sources/declarative/validators/__init__.py,sha256=_xccLn4QKQqR3CAwmCVOA7l6QuJd_Isoh6NsR8crM2U,663
|
241
241
|
airbyte_cdk/sources/declarative/validators/dpath_validator.py,sha256=MEehshc7YiqUhTNm7qN6mN6JBdkQcYsoLPqAQYIE_-0,2179
|
242
242
|
airbyte_cdk/sources/declarative/validators/predicate_validator.py,sha256=Q4eVnclk1vYPvVF7XROG4MFEVkPYbYKEF8SUKs7P7-k,582
|
243
243
|
airbyte_cdk/sources/declarative/validators/validate_adheres_to_schema.py,sha256=kjcuKxWMJEzpF4GiESITGMxBAXw6YZCAsgOQMgeBo4g,1085
|
244
|
-
airbyte_cdk/sources/declarative/validators/validate_in_line_condition.py,sha256=2TExLLDnp2qStLfQRtvteO2EO9doVqPbxjY8wzKSDEA,1488
|
245
244
|
airbyte_cdk/sources/declarative/validators/validation_strategy.py,sha256=LwqUX89cFdHTM1-h6c8vebBA9WC38HYoGBvJfCZHr0g,467
|
246
245
|
airbyte_cdk/sources/declarative/validators/validator.py,sha256=MAwo8OievUsuzBuPxI9pbPu87yq0tJZkGbydcrHZyQc,382
|
247
246
|
airbyte_cdk/sources/declarative/yaml_declarative_source.py,sha256=-pHwGO7ZW-x8lmsqSpbrN0pOgIyjJhFDGUNwB3kQWWc,2794
|
@@ -424,9 +423,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
|
|
424
423
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
|
425
424
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
426
425
|
airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
|
427
|
-
airbyte_cdk-6.56.
|
428
|
-
airbyte_cdk-6.56.
|
429
|
-
airbyte_cdk-6.56.
|
430
|
-
airbyte_cdk-6.56.
|
431
|
-
airbyte_cdk-6.56.
|
432
|
-
airbyte_cdk-6.56.
|
426
|
+
airbyte_cdk-6.56.4.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
427
|
+
airbyte_cdk-6.56.4.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
428
|
+
airbyte_cdk-6.56.4.dist-info/METADATA,sha256=kthz1eHkGXQQ9wuCUrdCip8thTi8Hi5G8pLhe9n2PDg,6392
|
429
|
+
airbyte_cdk-6.56.4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
430
|
+
airbyte_cdk-6.56.4.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
|
431
|
+
airbyte_cdk-6.56.4.dist-info/RECORD,,
|
@@ -1,43 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2025 Airbyte, Inc., all rights reserved.
|
3
|
-
#
|
4
|
-
|
5
|
-
from dataclasses import dataclass
|
6
|
-
from typing import Any
|
7
|
-
|
8
|
-
from jinja2.exceptions import TemplateError
|
9
|
-
|
10
|
-
from airbyte_cdk.sources.declarative.interpolation.interpolated_boolean import InterpolatedBoolean
|
11
|
-
from airbyte_cdk.sources.declarative.validators.validation_strategy import ValidationStrategy
|
12
|
-
from airbyte_cdk.sources.types import Config
|
13
|
-
|
14
|
-
|
15
|
-
@dataclass
|
16
|
-
class ValidateInLineCondition(ValidationStrategy):
|
17
|
-
"""
|
18
|
-
Validation strategy that evaluates the argument as an InterpolatedBoolean.
|
19
|
-
"""
|
20
|
-
|
21
|
-
config: Config
|
22
|
-
|
23
|
-
def validate(self, value: Any) -> None:
|
24
|
-
"""
|
25
|
-
Validates the argument as an InterpolatedBoolean.
|
26
|
-
|
27
|
-
:param value: The value to validate
|
28
|
-
:raises ValueError: If the condition is not a string or evaluates to False
|
29
|
-
"""
|
30
|
-
|
31
|
-
if isinstance(value, str):
|
32
|
-
interpolated_condition = InterpolatedBoolean(value, parameters={})
|
33
|
-
try:
|
34
|
-
result = interpolated_condition.eval(self.config)
|
35
|
-
except TemplateError as e:
|
36
|
-
raise ValueError(f"Invalid jinja expression: {value}.") from e
|
37
|
-
except Exception as e:
|
38
|
-
raise ValueError(f"Unexpected error evaluating condition: {value}.") from e
|
39
|
-
|
40
|
-
if not result:
|
41
|
-
raise ValueError(f"Condition evaluated to False: {value}.")
|
42
|
-
else:
|
43
|
-
raise ValueError(f"Invalid condition argument: {value}. Should be a string.")
|
{airbyte_cdk-6.56.3.post9.dev15860651667.dist-info → airbyte_cdk-6.56.4.dist-info}/LICENSE.txt
RENAMED
File without changes
|
{airbyte_cdk-6.56.3.post9.dev15860651667.dist-info → airbyte_cdk-6.56.4.dist-info}/LICENSE_SHORT
RENAMED
File without changes
|
File without changes
|
{airbyte_cdk-6.56.3.post9.dev15860651667.dist-info → airbyte_cdk-6.56.4.dist-info}/entry_points.txt
RENAMED
File without changes
|