airbyte-cdk 6.43.0__py3-none-any.whl → 6.43.1__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/manifest_declarative_source.py +6 -0
- airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py +16 -4
- {airbyte_cdk-6.43.0.dist-info → airbyte_cdk-6.43.1.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.43.0.dist-info → airbyte_cdk-6.43.1.dist-info}/RECORD +8 -8
- {airbyte_cdk-6.43.0.dist-info → airbyte_cdk-6.43.1.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.43.0.dist-info → airbyte_cdk-6.43.1.dist-info}/LICENSE_SHORT +0 -0
- {airbyte_cdk-6.43.0.dist-info → airbyte_cdk-6.43.1.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.43.0.dist-info → airbyte_cdk-6.43.1.dist-info}/entry_points.txt +0 -0
@@ -397,6 +397,12 @@ class ManifestDeclarativeSource(DeclarativeSource):
|
|
397
397
|
for dynamic_stream in components_resolver.resolve_components(
|
398
398
|
stream_template_config=stream_template_config
|
399
399
|
):
|
400
|
+
dynamic_stream = {
|
401
|
+
**ManifestComponentTransformer().propagate_types_and_parameters(
|
402
|
+
"", dynamic_stream, {}, use_parent_parameters=True
|
403
|
+
)
|
404
|
+
}
|
405
|
+
|
400
406
|
if "type" not in dynamic_stream:
|
401
407
|
dynamic_stream["type"] = "DeclarativeStream"
|
402
408
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
import copy
|
6
6
|
import typing
|
7
|
-
from typing import Any, Mapping
|
7
|
+
from typing import Any, Mapping, Optional
|
8
8
|
|
9
9
|
PARAMETERS_STR = "$parameters"
|
10
10
|
|
@@ -94,6 +94,7 @@ class ManifestComponentTransformer:
|
|
94
94
|
parent_field_identifier: str,
|
95
95
|
declarative_component: Mapping[str, Any],
|
96
96
|
parent_parameters: Mapping[str, Any],
|
97
|
+
use_parent_parameters: Optional[bool] = None,
|
97
98
|
) -> Mapping[str, Any]:
|
98
99
|
"""
|
99
100
|
Recursively transforms the specified declarative component and subcomponents to propagate parameters and insert the
|
@@ -103,6 +104,7 @@ class ManifestComponentTransformer:
|
|
103
104
|
:param declarative_component: The current component that is having type and parameters added
|
104
105
|
:param parent_field_identifier: The name of the field of the current component coming from the parent component
|
105
106
|
:param parent_parameters: The parameters set on parent components defined before the current component
|
107
|
+
:param use_parent_parameters: If set, parent parameters will be used as the source of truth when key names are the same
|
106
108
|
:return: A deep copy of the transformed component with types and parameters persisted to it
|
107
109
|
"""
|
108
110
|
propagated_component = dict(copy.deepcopy(declarative_component))
|
@@ -130,7 +132,11 @@ class ManifestComponentTransformer:
|
|
130
132
|
# level take precedence
|
131
133
|
current_parameters = dict(copy.deepcopy(parent_parameters))
|
132
134
|
component_parameters = propagated_component.pop(PARAMETERS_STR, {})
|
133
|
-
current_parameters =
|
135
|
+
current_parameters = (
|
136
|
+
{**component_parameters, **current_parameters}
|
137
|
+
if use_parent_parameters
|
138
|
+
else {**current_parameters, **component_parameters}
|
139
|
+
)
|
134
140
|
|
135
141
|
# Parameters should be applied to the current component fields with the existing field taking precedence over parameters if
|
136
142
|
# both exist
|
@@ -145,7 +151,10 @@ class ManifestComponentTransformer:
|
|
145
151
|
excluded_parameter = current_parameters.pop(field_name, None)
|
146
152
|
parent_type_field_identifier = f"{propagated_component.get('type')}.{field_name}"
|
147
153
|
propagated_component[field_name] = self.propagate_types_and_parameters(
|
148
|
-
parent_type_field_identifier,
|
154
|
+
parent_type_field_identifier,
|
155
|
+
field_value,
|
156
|
+
current_parameters,
|
157
|
+
use_parent_parameters=use_parent_parameters,
|
149
158
|
)
|
150
159
|
if excluded_parameter:
|
151
160
|
current_parameters[field_name] = excluded_parameter
|
@@ -158,7 +167,10 @@ class ManifestComponentTransformer:
|
|
158
167
|
f"{propagated_component.get('type')}.{field_name}"
|
159
168
|
)
|
160
169
|
field_value[i] = self.propagate_types_and_parameters(
|
161
|
-
parent_type_field_identifier,
|
170
|
+
parent_type_field_identifier,
|
171
|
+
element,
|
172
|
+
current_parameters,
|
173
|
+
use_parent_parameters=use_parent_parameters,
|
162
174
|
)
|
163
175
|
if excluded_parameter:
|
164
176
|
current_parameters[field_name] = excluded_parameter
|
@@ -109,7 +109,7 @@ airbyte_cdk/sources/declarative/interpolation/interpolated_string.py,sha256=CQkH
|
|
109
109
|
airbyte_cdk/sources/declarative/interpolation/interpolation.py,sha256=9IoeuWam3L6GyN10L6U8xNWXmkt9cnahSDNkez1OmFY,982
|
110
110
|
airbyte_cdk/sources/declarative/interpolation/jinja.py,sha256=UQeuS4Vpyp4hlOn-R3tRyeBX0e9IoV6jQ6gH-Jz8lY0,7182
|
111
111
|
airbyte_cdk/sources/declarative/interpolation/macros.py,sha256=CF2L_r73TCd1Wssq9_tjFPb4c872QM8oW6NL-DIR0h4,5226
|
112
|
-
airbyte_cdk/sources/declarative/manifest_declarative_source.py,sha256=
|
112
|
+
airbyte_cdk/sources/declarative/manifest_declarative_source.py,sha256=tUe54Xgy7dq-a7HNaPogk6AXlVeqQXHWde6_8_Xy0ow,19130
|
113
113
|
airbyte_cdk/sources/declarative/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
114
114
|
airbyte_cdk/sources/declarative/migrations/legacy_to_per_partition_state_migration.py,sha256=iemy3fKLczcU0-Aor7tx5jcT6DRedKMqyK7kCOp01hg,3924
|
115
115
|
airbyte_cdk/sources/declarative/migrations/state_migration.py,sha256=KWPjealMLKSMtajXgkdGgKg7EmTLR-CqqD7UIh0-eDU,794
|
@@ -118,7 +118,7 @@ airbyte_cdk/sources/declarative/models/declarative_component_schema.py,sha256=nz
|
|
118
118
|
airbyte_cdk/sources/declarative/parsers/__init__.py,sha256=ZnqYNxHsKCgO38IwB34RQyRMXTs4GTvlRi3ImKnIioo,61
|
119
119
|
airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py,sha256=nlVvHC511NUyDEEIRBkoeDTAvLqKNp-hRy8D19z8tdk,5941
|
120
120
|
airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=Rir9_z3Kcd5Es0-LChrzk-0qubAsiK_RSEnLmK2OXm8,553
|
121
|
-
airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=
|
121
|
+
airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=4C15MKV-zOrMVQAm4FyohDsrJUBCSpMv5tZw0SK3aeI,9685
|
122
122
|
airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py,sha256=IWUOdF03o-aQn0Occo1BJCxU0Pz-QILk5L67nzw2thw,6803
|
123
123
|
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=APJkP5dmDU4aIaj7w3quGjrP1cV3MMp2gxbTckhOVRA,149720
|
124
124
|
airbyte_cdk/sources/declarative/partition_routers/__init__.py,sha256=TBC9AkGaUqHm2IKHMPN6punBIcY5tWGULowcLoAVkfw,1109
|
@@ -359,9 +359,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
|
|
359
359
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
|
360
360
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
361
361
|
airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
|
362
|
-
airbyte_cdk-6.43.
|
363
|
-
airbyte_cdk-6.43.
|
364
|
-
airbyte_cdk-6.43.
|
365
|
-
airbyte_cdk-6.43.
|
366
|
-
airbyte_cdk-6.43.
|
367
|
-
airbyte_cdk-6.43.
|
362
|
+
airbyte_cdk-6.43.1.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
363
|
+
airbyte_cdk-6.43.1.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
364
|
+
airbyte_cdk-6.43.1.dist-info/METADATA,sha256=Zrfti0WPq-_VsjOASQALX5Gctg83yqECVMd-zOsyLOM,6071
|
365
|
+
airbyte_cdk-6.43.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
366
|
+
airbyte_cdk-6.43.1.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
|
367
|
+
airbyte_cdk-6.43.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|