airbyte-cdk 6.48.8__py3-none-any.whl → 6.48.9__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 +12 -2
- airbyte_cdk/sources/declarative/models/declarative_component_schema.py +10 -0
- airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +19 -2
- airbyte_cdk/sources/declarative/schema/composite_schema_loader.py +31 -0
- {airbyte_cdk-6.48.8.dist-info → airbyte_cdk-6.48.9.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.48.8.dist-info → airbyte_cdk-6.48.9.dist-info}/RECORD +10 -9
- {airbyte_cdk-6.48.8.dist-info → airbyte_cdk-6.48.9.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.48.8.dist-info → airbyte_cdk-6.48.9.dist-info}/LICENSE_SHORT +0 -0
- {airbyte_cdk-6.48.8.dist-info → airbyte_cdk-6.48.9.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.48.8.dist-info → airbyte_cdk-6.48.9.dist-info}/entry_points.txt +0 -0
@@ -1421,12 +1421,22 @@ definitions:
|
|
1421
1421
|
default: ""
|
1422
1422
|
schema_loader:
|
1423
1423
|
title: Schema Loader
|
1424
|
-
description:
|
1424
|
+
description:
|
1425
|
+
One or many schema loaders can be used to retrieve the schema for the current stream. When
|
1426
|
+
multiple schema loaders are defined, schema properties will be merged together. Schema
|
1427
|
+
loaders defined first taking precedence in the event of a conflict.
|
1425
1428
|
anyOf:
|
1426
1429
|
- "$ref": "#/definitions/InlineSchemaLoader"
|
1427
1430
|
- "$ref": "#/definitions/DynamicSchemaLoader"
|
1428
1431
|
- "$ref": "#/definitions/JsonFileSchemaLoader"
|
1429
1432
|
- "$ref": "#/definitions/CustomSchemaLoader"
|
1433
|
+
- type: array
|
1434
|
+
items:
|
1435
|
+
anyOf:
|
1436
|
+
- "$ref": "#/definitions/InlineSchemaLoader"
|
1437
|
+
- "$ref": "#/definitions/DynamicSchemaLoader"
|
1438
|
+
- "$ref": "#/definitions/JsonFileSchemaLoader"
|
1439
|
+
- "$ref": "#/definitions/CustomSchemaLoader"
|
1430
1440
|
# TODO we have move the transformation to the RecordSelector level in the code but kept this here for
|
1431
1441
|
# compatibility reason. We should eventually move this to align with the code.
|
1432
1442
|
transformations:
|
@@ -4362,4 +4372,4 @@ interpolation:
|
|
4362
4372
|
regex: The regular expression to search for. It must include a capture group.
|
4363
4373
|
return_type: str
|
4364
4374
|
examples:
|
4365
|
-
- '{{ "goodbye, cruel world" | regex_search("goodbye,\s(.*)$") }} -> "cruel world"'
|
4375
|
+
- '{{ "goodbye, cruel world" | regex_search("goodbye,\s(.*)$") }} -> "cruel world"'
|
@@ -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
|
|
@@ -2151,6 +2153,14 @@ class DeclarativeStream(BaseModel):
|
|
2151
2153
|
DynamicSchemaLoader,
|
2152
2154
|
JsonFileSchemaLoader,
|
2153
2155
|
CustomSchemaLoader,
|
2156
|
+
List[
|
2157
|
+
Union[
|
2158
|
+
InlineSchemaLoader,
|
2159
|
+
DynamicSchemaLoader,
|
2160
|
+
JsonFileSchemaLoader,
|
2161
|
+
CustomSchemaLoader,
|
2162
|
+
]
|
2163
|
+
],
|
2154
2164
|
]
|
2155
2165
|
] = Field(
|
2156
2166
|
None,
|
@@ -504,6 +504,7 @@ from airbyte_cdk.sources.declarative.schema import (
|
|
504
504
|
SchemaTypeIdentifier,
|
505
505
|
TypesMap,
|
506
506
|
)
|
507
|
+
from airbyte_cdk.sources.declarative.schema.composite_schema_loader import CompositeSchemaLoader
|
507
508
|
from airbyte_cdk.sources.declarative.spec import Spec
|
508
509
|
from airbyte_cdk.sources.declarative.stream_slicers import StreamSlicer
|
509
510
|
from airbyte_cdk.sources.declarative.transformations import (
|
@@ -1914,9 +1915,25 @@ class ModelToComponentFactory:
|
|
1914
1915
|
else:
|
1915
1916
|
state_transformations = []
|
1916
1917
|
|
1917
|
-
|
1918
|
+
schema_loader: Union[
|
1919
|
+
CompositeSchemaLoader,
|
1920
|
+
DefaultSchemaLoader,
|
1921
|
+
DynamicSchemaLoader,
|
1922
|
+
InlineSchemaLoader,
|
1923
|
+
JsonFileSchemaLoader,
|
1924
|
+
]
|
1925
|
+
if model.schema_loader and isinstance(model.schema_loader, list):
|
1926
|
+
nested_schema_loaders = [
|
1927
|
+
self._create_component_from_model(model=nested_schema_loader, config=config)
|
1928
|
+
for nested_schema_loader in model.schema_loader
|
1929
|
+
]
|
1930
|
+
schema_loader = CompositeSchemaLoader(
|
1931
|
+
schema_loaders=nested_schema_loaders, parameters={}
|
1932
|
+
)
|
1933
|
+
elif model.schema_loader:
|
1918
1934
|
schema_loader = self._create_component_from_model(
|
1919
|
-
model=model.schema_loader,
|
1935
|
+
model=model.schema_loader, # type: ignore # If defined, schema_loader is guaranteed not to be a list and will be one of the existing base models
|
1936
|
+
config=config,
|
1920
1937
|
)
|
1921
1938
|
else:
|
1922
1939
|
options = model.parameters or {}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2025 Airbyte, Inc., all rights reserved.
|
3
|
+
#
|
4
|
+
|
5
|
+
from dataclasses import InitVar, dataclass
|
6
|
+
from typing import Any, Dict, List, Mapping
|
7
|
+
|
8
|
+
from airbyte_cdk.sources.declarative.schema.schema_loader import SchemaLoader
|
9
|
+
|
10
|
+
|
11
|
+
@dataclass
|
12
|
+
class CompositeSchemaLoader(SchemaLoader):
|
13
|
+
"""
|
14
|
+
Schema loader that consists of multiple schema loaders that are combined into a single
|
15
|
+
schema. Subsequent schemas do not overwrite existing values so the schema loaders with
|
16
|
+
a higher priority should be defined first.
|
17
|
+
"""
|
18
|
+
|
19
|
+
schema_loaders: List[SchemaLoader]
|
20
|
+
parameters: InitVar[Mapping[str, Any]]
|
21
|
+
|
22
|
+
def get_json_schema(self) -> Mapping[str, Any]:
|
23
|
+
combined_schema: Dict[str, Any] = {
|
24
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
25
|
+
"type": ["null", "object"],
|
26
|
+
"properties": {},
|
27
|
+
}
|
28
|
+
for schema_loader in self.schema_loaders:
|
29
|
+
schema_properties = schema_loader.get_json_schema()["properties"]
|
30
|
+
combined_schema["properties"] = {**schema_properties, **combined_schema["properties"]}
|
31
|
+
return combined_schema
|
@@ -88,7 +88,7 @@ airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=GoZJ8Oxb
|
|
88
88
|
airbyte_cdk/sources/declarative/datetime/__init__.py,sha256=4Hw-PX1-VgESLF16cDdvuYCzGJtHntThLF4qIiULWeo,61
|
89
89
|
airbyte_cdk/sources/declarative/datetime/datetime_parser.py,sha256=_zGNGq31RNy_0QBLt_EcTvgPyhj7urPdx6oA3M5-r3o,3150
|
90
90
|
airbyte_cdk/sources/declarative/datetime/min_max_datetime.py,sha256=0BHBtDNQZfvwM45-tY5pNlTcKAFSGGNxemoi0Jic-0E,5785
|
91
|
-
airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=
|
91
|
+
airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=7tB0-d4lbI97GB5lBI6-qezxLoKZN4QeN_4Vht9TDFo,167270
|
92
92
|
airbyte_cdk/sources/declarative/declarative_source.py,sha256=qmyMnnet92eGc3C22yBtpvD5UZjqdhsAafP_zxI5wp8,1814
|
93
93
|
airbyte_cdk/sources/declarative/declarative_stream.py,sha256=dCRlddBUSaJmBNBz1pSO1r2rTw8AP5d2_vlmIeGs2gg,10767
|
94
94
|
airbyte_cdk/sources/declarative/decoders/__init__.py,sha256=JHb_0d3SE6kNY10mxA5YBEKPeSbsWYjByq1gUQxepoE,953
|
@@ -132,14 +132,14 @@ airbyte_cdk/sources/declarative/migrations/legacy_to_per_partition_state_migrati
|
|
132
132
|
airbyte_cdk/sources/declarative/migrations/state_migration.py,sha256=KWPjealMLKSMtajXgkdGgKg7EmTLR-CqqD7UIh0-eDU,794
|
133
133
|
airbyte_cdk/sources/declarative/models/__init__.py,sha256=nUFxNCiKeYRVXuZEKA7GD-lTHxsiKcQ8FitZjKhPIvE,100
|
134
134
|
airbyte_cdk/sources/declarative/models/base_model_with_deprecations.py,sha256=Imnj3yef0aqRdLfaUxkIYISUb8YkiPrRH_wBd-x8HjM,5999
|
135
|
-
airbyte_cdk/sources/declarative/models/declarative_component_schema.py,sha256=
|
135
|
+
airbyte_cdk/sources/declarative/models/declarative_component_schema.py,sha256=FjZ2WrItKCqMVxc14XRbMPu11Jhl1Ds3Lugy_2wPoQ8,118235
|
136
136
|
airbyte_cdk/sources/declarative/parsers/__init__.py,sha256=ZnqYNxHsKCgO38IwB34RQyRMXTs4GTvlRi3ImKnIioo,61
|
137
137
|
airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py,sha256=nlVvHC511NUyDEEIRBkoeDTAvLqKNp-hRy8D19z8tdk,5941
|
138
138
|
airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=wnRUP0Xeru9Rbu5OexXSDN9QWDo8YU4tT9M2LDVOgGA,802
|
139
139
|
airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=RUyFZS0zslLb7UfQrvqMC--k5CVLNSp7zHw6kbosvKE,9688
|
140
140
|
airbyte_cdk/sources/declarative/parsers/manifest_normalizer.py,sha256=laBy7ebjA-PiNwc-50U4FHvMqS_mmHvnabxgFs4CjGw,17069
|
141
141
|
airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py,sha256=pJmg78vqE5VfUrF_KJnWjucQ4k9IWFULeAxHCowrHXE,6806
|
142
|
-
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=
|
142
|
+
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=88ko64Gdfipyg9Uegz-XVCErWms0x5nHNZHCO7CRhVA,167112
|
143
143
|
airbyte_cdk/sources/declarative/partition_routers/__init__.py,sha256=TBC9AkGaUqHm2IKHMPN6punBIcY5tWGULowcLoAVkfw,1109
|
144
144
|
airbyte_cdk/sources/declarative/partition_routers/async_job_partition_router.py,sha256=VelO7zKqKtzMJ35jyFeg0ypJLQC0plqqIBNXoBW1G2E,3001
|
145
145
|
airbyte_cdk/sources/declarative/partition_routers/cartesian_product_stream_slicer.py,sha256=c5cuVFM6NFkuQqG8Z5IwkBuwDrvXZN1CunUOM_L0ezg,6892
|
@@ -208,6 +208,7 @@ airbyte_cdk/sources/declarative/retrievers/file_uploader/noop_file_writer.py,sha
|
|
208
208
|
airbyte_cdk/sources/declarative/retrievers/retriever.py,sha256=XPLs593Xv8c5cKMc37XzUAYmzlXd1a7eSsspM-CMuWA,1696
|
209
209
|
airbyte_cdk/sources/declarative/retrievers/simple_retriever.py,sha256=O7qpM71L1_ATIbEKa8y658jdiSJSPw0KmuGKgnaruQU,31008
|
210
210
|
airbyte_cdk/sources/declarative/schema/__init__.py,sha256=xU45UvM5O4c1PSM13UHpCdh5hpW3HXy9vRRGEiAC1rg,795
|
211
|
+
airbyte_cdk/sources/declarative/schema/composite_schema_loader.py,sha256=ymGbvxS_QyGc4nnjEyRo5ch8bVedELO41PAUxKXZyMw,1113
|
211
212
|
airbyte_cdk/sources/declarative/schema/default_schema_loader.py,sha256=UnbzlExmwoQiVV8zDg4lhAEaqA_0pRfwbMRe8yqOuWk,1834
|
212
213
|
airbyte_cdk/sources/declarative/schema/dynamic_schema_loader.py,sha256=J8Q_iJYhcSQLWyt0bTZCbDAGpxt9G8FCc6Q9jtGsNzw,10703
|
213
214
|
airbyte_cdk/sources/declarative/schema/inline_schema_loader.py,sha256=bVETE10hRsatRJq3R3BeyRR0wIoK3gcP1gcpVRQ_P5U,464
|
@@ -406,9 +407,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
|
|
406
407
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
|
407
408
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
408
409
|
airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
|
409
|
-
airbyte_cdk-6.48.
|
410
|
-
airbyte_cdk-6.48.
|
411
|
-
airbyte_cdk-6.48.
|
412
|
-
airbyte_cdk-6.48.
|
413
|
-
airbyte_cdk-6.48.
|
414
|
-
airbyte_cdk-6.48.
|
410
|
+
airbyte_cdk-6.48.9.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
411
|
+
airbyte_cdk-6.48.9.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
412
|
+
airbyte_cdk-6.48.9.dist-info/METADATA,sha256=gTA6WrjXLh_UFtrwmxoS5Ci4swMfmFMrnUta4edFt9A,6343
|
413
|
+
airbyte_cdk-6.48.9.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
414
|
+
airbyte_cdk-6.48.9.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
|
415
|
+
airbyte_cdk-6.48.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|