airbyte-cdk 6.59.2.post2.dev16455545426__py3-none-any.whl → 6.60.0__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 +4 -1
- airbyte_cdk/sources/declarative/models/declarative_component_schema.py +5 -1
- airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +25 -18
- airbyte_cdk/sources/declarative/resolvers/http_components_resolver.py +0 -14
- airbyte_cdk/sources/declarative/resolvers/parametrized_components_resolver.py +0 -14
- {airbyte_cdk-6.59.2.post2.dev16455545426.dist-info → airbyte_cdk-6.60.0.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.59.2.post2.dev16455545426.dist-info → airbyte_cdk-6.60.0.dist-info}/RECORD +11 -11
- {airbyte_cdk-6.59.2.post2.dev16455545426.dist-info → airbyte_cdk-6.60.0.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.59.2.post2.dev16455545426.dist-info → airbyte_cdk-6.60.0.dist-info}/LICENSE_SHORT +0 -0
- {airbyte_cdk-6.59.2.post2.dev16455545426.dist-info → airbyte_cdk-6.60.0.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.59.2.post2.dev16455545426.dist-info → airbyte_cdk-6.60.0.dist-info}/entry_points.txt +0 -0
@@ -4175,13 +4175,16 @@ definitions:
|
|
4175
4175
|
default: false
|
4176
4176
|
condition:
|
4177
4177
|
title: Condition
|
4178
|
-
description: A condition that must be met for the mapping to be applied.
|
4178
|
+
description: A condition that must be met for the mapping to be applied. This property is only supported for `ConfigComponentsResolver`.
|
4179
4179
|
type: string
|
4180
4180
|
interpolation_context:
|
4181
4181
|
- config
|
4182
4182
|
- stream_template_config
|
4183
4183
|
- components_values
|
4184
4184
|
- stream_slice
|
4185
|
+
examples:
|
4186
|
+
- "{{ components_values.get('cursor_field', None) }}"
|
4187
|
+
- "{{ '_incremental' in components_values.get('stream_name', '') }}"
|
4185
4188
|
$parameters:
|
4186
4189
|
type: object
|
4187
4190
|
additionalProperties: true
|
@@ -1496,7 +1496,11 @@ class ComponentMappingDefinition(BaseModel):
|
|
1496
1496
|
)
|
1497
1497
|
condition: Optional[str] = Field(
|
1498
1498
|
None,
|
1499
|
-
description="A condition that must be met for the mapping to be applied.",
|
1499
|
+
description="A condition that must be met for the mapping to be applied. This property is only supported for `ConfigComponentsResolver`.",
|
1500
|
+
examples=[
|
1501
|
+
"{{ components_values.get('cursor_field', None) }}",
|
1502
|
+
"{{ '_incremental' in components_values.get('stream_name', '') }}",
|
1503
|
+
],
|
1500
1504
|
title="Condition",
|
1501
1505
|
)
|
1502
1506
|
parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
|
@@ -3819,16 +3819,19 @@ class ModelToComponentFactory:
|
|
3819
3819
|
transformations=[],
|
3820
3820
|
)
|
3821
3821
|
|
3822
|
-
components_mapping = [
|
3823
|
-
|
3824
|
-
|
3825
|
-
|
3826
|
-
|
3827
|
-
|
3828
|
-
|
3822
|
+
components_mapping = []
|
3823
|
+
for component_mapping_definition_model in model.components_mapping:
|
3824
|
+
if component_mapping_definition_model.condition:
|
3825
|
+
raise ValueError("`condition` is only supported for `ConfigComponentsResolver`")
|
3826
|
+
components_mapping.append(
|
3827
|
+
self._create_component_from_model(
|
3828
|
+
model=component_mapping_definition_model,
|
3829
|
+
value_type=ModelToComponentFactory._json_schema_type_name_to_type(
|
3830
|
+
component_mapping_definition_model.value_type
|
3831
|
+
),
|
3832
|
+
config=config,
|
3833
|
+
)
|
3829
3834
|
)
|
3830
|
-
for components_mapping_definition_model in model.components_mapping
|
3831
|
-
]
|
3832
3835
|
|
3833
3836
|
return HttpComponentsResolver(
|
3834
3837
|
retriever=retriever,
|
@@ -3892,16 +3895,20 @@ class ModelToComponentFactory:
|
|
3892
3895
|
stream_parameters = StreamParametersDefinition(
|
3893
3896
|
list_of_parameters_for_stream=model.stream_parameters.list_of_parameters_for_stream
|
3894
3897
|
)
|
3895
|
-
|
3896
|
-
|
3897
|
-
|
3898
|
-
|
3899
|
-
|
3900
|
-
|
3901
|
-
|
3898
|
+
|
3899
|
+
components_mapping = []
|
3900
|
+
for components_mapping_definition_model in model.components_mapping:
|
3901
|
+
if components_mapping_definition_model.condition:
|
3902
|
+
raise ValueError("`condition` is only supported for `ConfigComponentsResolver`")
|
3903
|
+
components_mapping.append(
|
3904
|
+
self._create_component_from_model(
|
3905
|
+
model=components_mapping_definition_model,
|
3906
|
+
value_type=ModelToComponentFactory._json_schema_type_name_to_type(
|
3907
|
+
components_mapping_definition_model.value_type
|
3908
|
+
),
|
3909
|
+
config=config,
|
3910
|
+
)
|
3902
3911
|
)
|
3903
|
-
for components_mapping_definition_model in model.components_mapping
|
3904
|
-
]
|
3905
3912
|
return ParametrizedComponentsResolver(
|
3906
3913
|
stream_parameters=stream_parameters,
|
3907
3914
|
config=config,
|
@@ -10,7 +10,6 @@ import dpath
|
|
10
10
|
from typing_extensions import deprecated
|
11
11
|
|
12
12
|
from airbyte_cdk.sources.declarative.interpolation import InterpolatedString
|
13
|
-
from airbyte_cdk.sources.declarative.interpolation.interpolated_boolean import InterpolatedBoolean
|
14
13
|
from airbyte_cdk.sources.declarative.resolvers.components_resolver import (
|
15
14
|
ComponentMappingDefinition,
|
16
15
|
ComponentsResolver,
|
@@ -50,12 +49,6 @@ class HttpComponentsResolver(ComponentsResolver):
|
|
50
49
|
parameters (Mapping[str, Any]): Parameters for interpolation.
|
51
50
|
"""
|
52
51
|
for component_mapping in self.components_mapping:
|
53
|
-
interpolated_condition = (
|
54
|
-
InterpolatedBoolean(condition=component_mapping.condition, parameters=parameters)
|
55
|
-
if component_mapping.condition
|
56
|
-
else None
|
57
|
-
)
|
58
|
-
|
59
52
|
if isinstance(component_mapping.value, (str, InterpolatedString)):
|
60
53
|
interpolated_value = (
|
61
54
|
InterpolatedString.create(component_mapping.value, parameters=parameters)
|
@@ -74,7 +67,6 @@ class HttpComponentsResolver(ComponentsResolver):
|
|
74
67
|
value=interpolated_value,
|
75
68
|
value_type=component_mapping.value_type,
|
76
69
|
parameters=parameters,
|
77
|
-
condition=interpolated_condition,
|
78
70
|
)
|
79
71
|
)
|
80
72
|
else:
|
@@ -105,12 +97,6 @@ class HttpComponentsResolver(ComponentsResolver):
|
|
105
97
|
kwargs["stream_slice"] = stream_slice # type: ignore[assignment] # stream_slice will always be of type Mapping[str, Any]
|
106
98
|
|
107
99
|
for resolved_component in self._resolved_components:
|
108
|
-
if (
|
109
|
-
resolved_component.condition is not None
|
110
|
-
and not resolved_component.condition.eval(self.config, **kwargs)
|
111
|
-
):
|
112
|
-
continue
|
113
|
-
|
114
100
|
valid_types = (
|
115
101
|
(resolved_component.value_type,) if resolved_component.value_type else None
|
116
102
|
)
|
@@ -12,7 +12,6 @@ from typing_extensions import deprecated
|
|
12
12
|
from yaml.parser import ParserError
|
13
13
|
|
14
14
|
from airbyte_cdk.sources.declarative.interpolation import InterpolatedString
|
15
|
-
from airbyte_cdk.sources.declarative.interpolation.interpolated_boolean import InterpolatedBoolean
|
16
15
|
from airbyte_cdk.sources.declarative.resolvers.components_resolver import (
|
17
16
|
ComponentMappingDefinition,
|
18
17
|
ComponentsResolver,
|
@@ -56,12 +55,6 @@ class ParametrizedComponentsResolver(ComponentsResolver):
|
|
56
55
|
"""
|
57
56
|
|
58
57
|
for component_mapping in self.components_mapping:
|
59
|
-
interpolated_condition = (
|
60
|
-
InterpolatedBoolean(condition=component_mapping.condition, parameters=parameters)
|
61
|
-
if component_mapping.condition
|
62
|
-
else None
|
63
|
-
)
|
64
|
-
|
65
58
|
if isinstance(component_mapping.value, (str, InterpolatedString)):
|
66
59
|
interpolated_value = (
|
67
60
|
InterpolatedString.create(component_mapping.value, parameters=parameters)
|
@@ -81,7 +74,6 @@ class ParametrizedComponentsResolver(ComponentsResolver):
|
|
81
74
|
value_type=component_mapping.value_type,
|
82
75
|
create_or_update=component_mapping.create_or_update,
|
83
76
|
parameters=parameters,
|
84
|
-
condition=interpolated_condition,
|
85
77
|
)
|
86
78
|
)
|
87
79
|
else:
|
@@ -98,12 +90,6 @@ class ParametrizedComponentsResolver(ComponentsResolver):
|
|
98
90
|
updated_config = deepcopy(stream_template_config)
|
99
91
|
kwargs["components_values"] = components_values # type: ignore[assignment] # component_values will always be of type Mapping[str, Any]
|
100
92
|
for resolved_component in self._resolved_components:
|
101
|
-
if (
|
102
|
-
resolved_component.condition is not None
|
103
|
-
and not resolved_component.condition.eval(self.config, **kwargs)
|
104
|
-
):
|
105
|
-
continue
|
106
|
-
|
107
93
|
valid_types = (
|
108
94
|
(resolved_component.value_type,) if resolved_component.value_type else None
|
109
95
|
)
|
@@ -90,7 +90,7 @@ airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=rQz9gXp3
|
|
90
90
|
airbyte_cdk/sources/declarative/datetime/__init__.py,sha256=4Hw-PX1-VgESLF16cDdvuYCzGJtHntThLF4qIiULWeo,61
|
91
91
|
airbyte_cdk/sources/declarative/datetime/datetime_parser.py,sha256=_zGNGq31RNy_0QBLt_EcTvgPyhj7urPdx6oA3M5-r3o,3150
|
92
92
|
airbyte_cdk/sources/declarative/datetime/min_max_datetime.py,sha256=0BHBtDNQZfvwM45-tY5pNlTcKAFSGGNxemoi0Jic-0E,5785
|
93
|
-
airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=
|
93
|
+
airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=FlHXxlxEtiLZTmZ826aijk1bkUC167wa-qO3YOD4eWw,186652
|
94
94
|
airbyte_cdk/sources/declarative/declarative_source.py,sha256=qmyMnnet92eGc3C22yBtpvD5UZjqdhsAafP_zxI5wp8,1814
|
95
95
|
airbyte_cdk/sources/declarative/declarative_stream.py,sha256=dCRlddBUSaJmBNBz1pSO1r2rTw8AP5d2_vlmIeGs2gg,10767
|
96
96
|
airbyte_cdk/sources/declarative/decoders/__init__.py,sha256=JHb_0d3SE6kNY10mxA5YBEKPeSbsWYjByq1gUQxepoE,953
|
@@ -134,14 +134,14 @@ airbyte_cdk/sources/declarative/migrations/legacy_to_per_partition_state_migrati
|
|
134
134
|
airbyte_cdk/sources/declarative/migrations/state_migration.py,sha256=KWPjealMLKSMtajXgkdGgKg7EmTLR-CqqD7UIh0-eDU,794
|
135
135
|
airbyte_cdk/sources/declarative/models/__init__.py,sha256=nUFxNCiKeYRVXuZEKA7GD-lTHxsiKcQ8FitZjKhPIvE,100
|
136
136
|
airbyte_cdk/sources/declarative/models/base_model_with_deprecations.py,sha256=Imnj3yef0aqRdLfaUxkIYISUb8YkiPrRH_wBd-x8HjM,5999
|
137
|
-
airbyte_cdk/sources/declarative/models/declarative_component_schema.py,sha256=
|
137
|
+
airbyte_cdk/sources/declarative/models/declarative_component_schema.py,sha256=HjCMwAUm_EyRNeafeNMA3Sx1uIOf-RZgtpueY0Li_vE,132129
|
138
138
|
airbyte_cdk/sources/declarative/parsers/__init__.py,sha256=ZnqYNxHsKCgO38IwB34RQyRMXTs4GTvlRi3ImKnIioo,61
|
139
139
|
airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py,sha256=nlVvHC511NUyDEEIRBkoeDTAvLqKNp-hRy8D19z8tdk,5941
|
140
140
|
airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=wnRUP0Xeru9Rbu5OexXSDN9QWDo8YU4tT9M2LDVOgGA,802
|
141
141
|
airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=2UdpCz3yi7ISZTyqkQXSSy3dMxeyOWqV7OlAS5b9GVg,11568
|
142
142
|
airbyte_cdk/sources/declarative/parsers/manifest_normalizer.py,sha256=EtKjS9c94yNp3AwQC8KUCQaAYW5T3zvFYxoWYjc_buI,19729
|
143
143
|
airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py,sha256=pJmg78vqE5VfUrF_KJnWjucQ4k9IWFULeAxHCowrHXE,6806
|
144
|
-
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=
|
144
|
+
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=kmteSTmgLsUwMkR6K2HQPTRgLZ4W_CZXsAraFg8IRQ4,178085
|
145
145
|
airbyte_cdk/sources/declarative/partition_routers/__init__.py,sha256=TBC9AkGaUqHm2IKHMPN6punBIcY5tWGULowcLoAVkfw,1109
|
146
146
|
airbyte_cdk/sources/declarative/partition_routers/async_job_partition_router.py,sha256=VelO7zKqKtzMJ35jyFeg0ypJLQC0plqqIBNXoBW1G2E,3001
|
147
147
|
airbyte_cdk/sources/declarative/partition_routers/cartesian_product_stream_slicer.py,sha256=c5cuVFM6NFkuQqG8Z5IwkBuwDrvXZN1CunUOM_L0ezg,6892
|
@@ -197,8 +197,8 @@ airbyte_cdk/sources/declarative/requesters/requester.py,sha256=T6tMx_Bx4iT-0YVjY
|
|
197
197
|
airbyte_cdk/sources/declarative/resolvers/__init__.py,sha256=xVhOWLQW0wFBTAtRYu3GdFebPqKCDSt1uoP2TiBGrvs,1643
|
198
198
|
airbyte_cdk/sources/declarative/resolvers/components_resolver.py,sha256=rkNatGGhPQhasor95CujY7StmVn5q2UDGAcEzMKueGE,2213
|
199
199
|
airbyte_cdk/sources/declarative/resolvers/config_components_resolver.py,sha256=OqL3Xil-2905pNfGwE-uPtEu53ksnT99Aec91cu5eSM,8408
|
200
|
-
airbyte_cdk/sources/declarative/resolvers/http_components_resolver.py,sha256=
|
201
|
-
airbyte_cdk/sources/declarative/resolvers/parametrized_components_resolver.py,sha256=
|
200
|
+
airbyte_cdk/sources/declarative/resolvers/http_components_resolver.py,sha256=AiojNs8wItJFrENZBFUaDvau3sgwudO6Wkra36upSPo,4639
|
201
|
+
airbyte_cdk/sources/declarative/resolvers/parametrized_components_resolver.py,sha256=BUmvbsMeIGusZSCd80NiTFcwcosq-uhXHGNheAFs-10,5147
|
202
202
|
airbyte_cdk/sources/declarative/retrievers/__init__.py,sha256=LQQspOQS9oyOx9cGnRIz1mq-8DZCBysyDJDPqjy1HvM,449
|
203
203
|
airbyte_cdk/sources/declarative/retrievers/async_retriever.py,sha256=6oZtnCHm9NdDvjTSrVwPQOXGSdETSIR7eWH2vFjM7jI,4855
|
204
204
|
airbyte_cdk/sources/declarative/retrievers/file_uploader/__init__.py,sha256=ovs0oZGPEEw-V4asqr0D1Xty2u7tR8ADhRuHNgXGuWQ,490
|
@@ -424,9 +424,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
|
|
424
424
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
|
425
425
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
426
426
|
airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
|
427
|
-
airbyte_cdk-6.
|
428
|
-
airbyte_cdk-6.
|
429
|
-
airbyte_cdk-6.
|
430
|
-
airbyte_cdk-6.
|
431
|
-
airbyte_cdk-6.
|
432
|
-
airbyte_cdk-6.
|
427
|
+
airbyte_cdk-6.60.0.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
428
|
+
airbyte_cdk-6.60.0.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
429
|
+
airbyte_cdk-6.60.0.dist-info/METADATA,sha256=7rqP7Rfw-t--oR0jX1QpDlvLlMLRExIhryx3Uy90zBo,6477
|
430
|
+
airbyte_cdk-6.60.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
431
|
+
airbyte_cdk-6.60.0.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
|
432
|
+
airbyte_cdk-6.60.0.dist-info/RECORD,,
|
{airbyte_cdk-6.59.2.post2.dev16455545426.dist-info → airbyte_cdk-6.60.0.dist-info}/LICENSE.txt
RENAMED
File without changes
|
{airbyte_cdk-6.59.2.post2.dev16455545426.dist-info → airbyte_cdk-6.60.0.dist-info}/LICENSE_SHORT
RENAMED
File without changes
|
File without changes
|
{airbyte_cdk-6.59.2.post2.dev16455545426.dist-info → airbyte_cdk-6.60.0.dist-info}/entry_points.txt
RENAMED
File without changes
|