airbyte-cdk 6.46.0__py3-none-any.whl → 6.46.0.post4.dev14712712756__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 +6 -2
- airbyte_cdk/sources/declarative/models/declarative_component_schema.py +7 -0
- airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +40 -9
- airbyte_cdk/sources/declarative/requesters/query_properties/query_properties.py +0 -10
- {airbyte_cdk-6.46.0.dist-info → airbyte_cdk-6.46.0.post4.dev14712712756.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.46.0.dist-info → airbyte_cdk-6.46.0.post4.dev14712712756.dist-info}/RECORD +10 -10
- {airbyte_cdk-6.46.0.dist-info → airbyte_cdk-6.46.0.post4.dev14712712756.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.46.0.dist-info → airbyte_cdk-6.46.0.post4.dev14712712756.dist-info}/LICENSE_SHORT +0 -0
- {airbyte_cdk-6.46.0.dist-info → airbyte_cdk-6.46.0.post4.dev14712712756.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.46.0.dist-info → airbyte_cdk-6.46.0.post4.dev14712712756.dist-info}/entry_points.txt +0 -0
@@ -1464,7 +1464,7 @@ definitions:
|
|
1464
1464
|
properties:
|
1465
1465
|
type:
|
1466
1466
|
type: string
|
1467
|
-
enum: [
|
1467
|
+
enum: [FileUploader]
|
1468
1468
|
requester:
|
1469
1469
|
description: Requester component that describes how to prepare HTTP requests to send to the source API.
|
1470
1470
|
anyOf:
|
@@ -1978,6 +1978,10 @@ definitions:
|
|
1978
1978
|
- "$ref": "#/definitions/SelectiveAuthenticator"
|
1979
1979
|
- "$ref": "#/definitions/CustomAuthenticator"
|
1980
1980
|
- "$ref": "#/definitions/LegacySessionTokenAuthenticator"
|
1981
|
+
fetch_properties_from_endpoint:
|
1982
|
+
title: Fetch Properties from Endpoint
|
1983
|
+
description: Allows for retrieving a dynamic set of properties from an API endpoint which can be injected into outbound request using the stream_partition.extra_fields.
|
1984
|
+
"$ref": "#/definitions/PropertiesFromEndpoint"
|
1981
1985
|
request_body_data:
|
1982
1986
|
title: Request Body Payload (Non-JSON)
|
1983
1987
|
description: Specifies how to populate the body of the request with a non-JSON payload. Plain text will be sent as is, whereas objects will be converted to a urlencoded form.
|
@@ -2370,7 +2374,7 @@ definitions:
|
|
2370
2374
|
properties:
|
2371
2375
|
type:
|
2372
2376
|
type: string
|
2373
|
-
enum: [
|
2377
|
+
enum: [KeyTransformation]
|
2374
2378
|
prefix:
|
2375
2379
|
title: Key Prefix
|
2376
2380
|
description: Prefix to add for object keys. If not provided original keys remain unchanged.
|
@@ -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
|
|
@@ -2252,6 +2254,11 @@ class HttpRequester(BaseModel):
|
|
2252
2254
|
description="Authentication method to use for requests sent to the API.",
|
2253
2255
|
title="Authenticator",
|
2254
2256
|
)
|
2257
|
+
fetch_properties_from_endpoint: Optional[PropertiesFromEndpoint] = Field(
|
2258
|
+
None,
|
2259
|
+
description="Allows for retrieving a dynamic set of properties from an API endpoint which can be injected into outbound request using the stream_partition.extra_fields.",
|
2260
|
+
title="Fetch Properties from Endpoint",
|
2261
|
+
)
|
2255
2262
|
request_body_data: Optional[Union[Dict[str, str], str]] = Field(
|
2256
2263
|
None,
|
2257
2264
|
description="Specifies how to populate the body of the request with a non-JSON payload. Plain text will be sent as is, whereas objects will be converted to a urlencoded form.",
|
@@ -2945,16 +2945,19 @@ class ModelToComponentFactory:
|
|
2945
2945
|
|
2946
2946
|
query_properties: Optional[QueryProperties] = None
|
2947
2947
|
query_properties_key: Optional[str] = None
|
2948
|
-
if (
|
2949
|
-
|
2950
|
-
|
2951
|
-
|
2952
|
-
|
2948
|
+
if self._query_properties_in_request_parameters(model.requester):
|
2949
|
+
# It is better to be explicit about an error if PropertiesFromEndpoint is defined in multiple
|
2950
|
+
# places instead of default to request_parameters which isn't clearly documented
|
2951
|
+
if (
|
2952
|
+
hasattr(model.requester, "fetch_properties_from_endpoint")
|
2953
|
+
and model.requester.fetch_properties_from_endpoint
|
2954
|
+
):
|
2955
|
+
raise ValueError(
|
2956
|
+
f"PropertiesFromEndpoint should only be specified once per stream, but found in {model.requester.type}.fetch_properties_from_endpoint and {model.requester.type}.request_parameters"
|
2957
|
+
)
|
2958
|
+
|
2953
2959
|
query_properties_definitions = []
|
2954
|
-
for key, request_parameter in model.requester.request_parameters.items():
|
2955
|
-
# When translating JSON schema into Pydantic models, enforcing types for arrays containing both
|
2956
|
-
# concrete string complex object definitions like QueryProperties would get resolved to Union[str, Any].
|
2957
|
-
# This adds the extra validation that we couldn't get for free in Pydantic model generation
|
2960
|
+
for key, request_parameter in model.requester.request_parameters.items(): # type: ignore # request_parameters is already validated to be a Mapping using _query_properties_in_request_parameters()
|
2958
2961
|
if isinstance(request_parameter, QueryPropertiesModel):
|
2959
2962
|
query_properties_key = key
|
2960
2963
|
query_properties_definitions.append(request_parameter)
|
@@ -2968,6 +2971,21 @@ class ModelToComponentFactory:
|
|
2968
2971
|
query_properties = self._create_component_from_model(
|
2969
2972
|
model=query_properties_definitions[0], config=config
|
2970
2973
|
)
|
2974
|
+
elif (
|
2975
|
+
hasattr(model.requester, "fetch_properties_from_endpoint")
|
2976
|
+
and model.requester.fetch_properties_from_endpoint
|
2977
|
+
):
|
2978
|
+
query_properties_definition = QueryPropertiesModel(
|
2979
|
+
type="QueryProperties",
|
2980
|
+
property_list=model.requester.fetch_properties_from_endpoint,
|
2981
|
+
always_include_properties=None,
|
2982
|
+
property_chunking=None,
|
2983
|
+
) # type: ignore # $parameters has a default value
|
2984
|
+
|
2985
|
+
query_properties = self.create_query_properties(
|
2986
|
+
model=query_properties_definition,
|
2987
|
+
config=config,
|
2988
|
+
)
|
2971
2989
|
|
2972
2990
|
requester = self._create_component_from_model(
|
2973
2991
|
model=model.requester,
|
@@ -3087,6 +3105,19 @@ class ModelToComponentFactory:
|
|
3087
3105
|
parameters=model.parameters or {},
|
3088
3106
|
)
|
3089
3107
|
|
3108
|
+
@staticmethod
|
3109
|
+
def _query_properties_in_request_parameters(
|
3110
|
+
requester: Union[HttpRequesterModel, CustomRequesterModel],
|
3111
|
+
) -> bool:
|
3112
|
+
if not hasattr(requester, "request_parameters"):
|
3113
|
+
return False
|
3114
|
+
request_parameters = requester.request_parameters
|
3115
|
+
if request_parameters and isinstance(request_parameters, Mapping):
|
3116
|
+
for request_parameter in request_parameters.values():
|
3117
|
+
if isinstance(request_parameter, QueryPropertiesModel):
|
3118
|
+
return True
|
3119
|
+
return False
|
3120
|
+
|
3090
3121
|
@staticmethod
|
3091
3122
|
def _remove_query_properties(
|
3092
3123
|
request_parameters: Mapping[str, Union[str, QueryPropertiesModel]],
|
@@ -46,13 +46,3 @@ class QueryProperties:
|
|
46
46
|
)
|
47
47
|
else:
|
48
48
|
yield list(fields)
|
49
|
-
|
50
|
-
# delete later, but leaving this to keep the discussion thread on the PR from getting hidden
|
51
|
-
def has_multiple_chunks(self, stream_slice: Optional[StreamSlice]) -> bool:
|
52
|
-
property_chunks = iter(self.get_request_property_chunks(stream_slice=stream_slice))
|
53
|
-
try:
|
54
|
-
next(property_chunks)
|
55
|
-
next(property_chunks)
|
56
|
-
return True
|
57
|
-
except StopIteration:
|
58
|
-
return False
|
@@ -78,7 +78,7 @@ airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=mB0wBAuA
|
|
78
78
|
airbyte_cdk/sources/declarative/datetime/__init__.py,sha256=4Hw-PX1-VgESLF16cDdvuYCzGJtHntThLF4qIiULWeo,61
|
79
79
|
airbyte_cdk/sources/declarative/datetime/datetime_parser.py,sha256=_zGNGq31RNy_0QBLt_EcTvgPyhj7urPdx6oA3M5-r3o,3150
|
80
80
|
airbyte_cdk/sources/declarative/datetime/min_max_datetime.py,sha256=0BHBtDNQZfvwM45-tY5pNlTcKAFSGGNxemoi0Jic-0E,5785
|
81
|
-
airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=
|
81
|
+
airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=I0jTe3nUqS5pW-LbdOQlYuHZIJC3nNAf_LV7XgmfA4g,162221
|
82
82
|
airbyte_cdk/sources/declarative/declarative_source.py,sha256=nF7wBqFd3AQmEKAm4CnIo29CJoQL562cJGSCeL8U8bA,1531
|
83
83
|
airbyte_cdk/sources/declarative/declarative_stream.py,sha256=dCRlddBUSaJmBNBz1pSO1r2rTw8AP5d2_vlmIeGs2gg,10767
|
84
84
|
airbyte_cdk/sources/declarative/decoders/__init__.py,sha256=JHb_0d3SE6kNY10mxA5YBEKPeSbsWYjByq1gUQxepoE,953
|
@@ -121,14 +121,14 @@ airbyte_cdk/sources/declarative/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW
|
|
121
121
|
airbyte_cdk/sources/declarative/migrations/legacy_to_per_partition_state_migration.py,sha256=iemy3fKLczcU0-Aor7tx5jcT6DRedKMqyK7kCOp01hg,3924
|
122
122
|
airbyte_cdk/sources/declarative/migrations/state_migration.py,sha256=KWPjealMLKSMtajXgkdGgKg7EmTLR-CqqD7UIh0-eDU,794
|
123
123
|
airbyte_cdk/sources/declarative/models/__init__.py,sha256=nUFxNCiKeYRVXuZEKA7GD-lTHxsiKcQ8FitZjKhPIvE,100
|
124
|
-
airbyte_cdk/sources/declarative/models/declarative_component_schema.py,sha256=
|
124
|
+
airbyte_cdk/sources/declarative/models/declarative_component_schema.py,sha256=i38088qAfh5YMIOEkHdOVqMwDDCayAYtj66EHb3eJNE,114915
|
125
125
|
airbyte_cdk/sources/declarative/parsers/__init__.py,sha256=ZnqYNxHsKCgO38IwB34RQyRMXTs4GTvlRi3ImKnIioo,61
|
126
126
|
airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py,sha256=nlVvHC511NUyDEEIRBkoeDTAvLqKNp-hRy8D19z8tdk,5941
|
127
127
|
airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=wnRUP0Xeru9Rbu5OexXSDN9QWDo8YU4tT9M2LDVOgGA,802
|
128
128
|
airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=RUyFZS0zslLb7UfQrvqMC--k5CVLNSp7zHw6kbosvKE,9688
|
129
129
|
airbyte_cdk/sources/declarative/parsers/manifest_normalizer.py,sha256=laBy7ebjA-PiNwc-50U4FHvMqS_mmHvnabxgFs4CjGw,17069
|
130
130
|
airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py,sha256=pJmg78vqE5VfUrF_KJnWjucQ4k9IWFULeAxHCowrHXE,6806
|
131
|
-
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=
|
131
|
+
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=38BeQoyZinImoX0Ab95Bvs3_OdoxVVK-hPAqkqgQ_jE,163246
|
132
132
|
airbyte_cdk/sources/declarative/partition_routers/__init__.py,sha256=TBC9AkGaUqHm2IKHMPN6punBIcY5tWGULowcLoAVkfw,1109
|
133
133
|
airbyte_cdk/sources/declarative/partition_routers/async_job_partition_router.py,sha256=VelO7zKqKtzMJ35jyFeg0ypJLQC0plqqIBNXoBW1G2E,3001
|
134
134
|
airbyte_cdk/sources/declarative/partition_routers/cartesian_product_stream_slicer.py,sha256=c5cuVFM6NFkuQqG8Z5IwkBuwDrvXZN1CunUOM_L0ezg,6892
|
@@ -167,7 +167,7 @@ airbyte_cdk/sources/declarative/requesters/paginators/strategies/stop_condition.
|
|
167
167
|
airbyte_cdk/sources/declarative/requesters/query_properties/__init__.py,sha256=sHwHVuN6djuRBF7zQb-HmINV0By4wE5j_i6TjmIPMzQ,494
|
168
168
|
airbyte_cdk/sources/declarative/requesters/query_properties/properties_from_endpoint.py,sha256=3h9Ae6TNGagh9sMYWdG5KoEFWDlqUWZ5fkswTPreveM,1616
|
169
169
|
airbyte_cdk/sources/declarative/requesters/query_properties/property_chunking.py,sha256=G-kHHopdScW8oLqLOEaCwgk6Ri8H-7BprZyaw1uKV4s,2982
|
170
|
-
airbyte_cdk/sources/declarative/requesters/query_properties/query_properties.py,sha256=
|
170
|
+
airbyte_cdk/sources/declarative/requesters/query_properties/query_properties.py,sha256=SWJhthd-CudJZDNOXK8maMc94BI3pDOK00xyL92Qzcs,2220
|
171
171
|
airbyte_cdk/sources/declarative/requesters/query_properties/strategies/__init__.py,sha256=ojiPj9eVU7SuNpF3RZwhZWW21IYLQYEoxpzg1rCdvNM,350
|
172
172
|
airbyte_cdk/sources/declarative/requesters/query_properties/strategies/group_by_key.py,sha256=np4uTwSpQvXxubIzVbwSDX0Xf3EgVn8kkhs6zYLOdAQ,1081
|
173
173
|
airbyte_cdk/sources/declarative/requesters/query_properties/strategies/merge_strategy.py,sha256=iuk9QxpwvKVtdrq9eadQVkZ-Sfk3qhyyAAErprBfw2s,516
|
@@ -390,9 +390,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
|
|
390
390
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
|
391
391
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
392
392
|
airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
|
393
|
-
airbyte_cdk-6.46.0.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
394
|
-
airbyte_cdk-6.46.0.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
395
|
-
airbyte_cdk-6.46.0.dist-info/METADATA,sha256=
|
396
|
-
airbyte_cdk-6.46.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
397
|
-
airbyte_cdk-6.46.0.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
|
398
|
-
airbyte_cdk-6.46.0.dist-info/RECORD,,
|
393
|
+
airbyte_cdk-6.46.0.post4.dev14712712756.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
394
|
+
airbyte_cdk-6.46.0.post4.dev14712712756.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
|
395
|
+
airbyte_cdk-6.46.0.post4.dev14712712756.dist-info/METADATA,sha256=e7PGWGsmQ0FLNCM8Pr1cxId_G8wcPPj6uLsbl05mqUo,6344
|
396
|
+
airbyte_cdk-6.46.0.post4.dev14712712756.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
397
|
+
airbyte_cdk-6.46.0.post4.dev14712712756.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
|
398
|
+
airbyte_cdk-6.46.0.post4.dev14712712756.dist-info/RECORD,,
|
{airbyte_cdk-6.46.0.dist-info → airbyte_cdk-6.46.0.post4.dev14712712756.dist-info}/LICENSE.txt
RENAMED
File without changes
|
{airbyte_cdk-6.46.0.dist-info → airbyte_cdk-6.46.0.post4.dev14712712756.dist-info}/LICENSE_SHORT
RENAMED
File without changes
|
File without changes
|
{airbyte_cdk-6.46.0.dist-info → airbyte_cdk-6.46.0.post4.dev14712712756.dist-info}/entry_points.txt
RENAMED
File without changes
|