airbyte-cdk 6.43.1__py3-none-any.whl → 6.45.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/checks/__init__.py +5 -2
- airbyte_cdk/sources/declarative/checks/check_stream.py +113 -11
- airbyte_cdk/sources/declarative/declarative_component_schema.yaml +139 -2
- airbyte_cdk/sources/declarative/models/declarative_component_schema.py +94 -8
- airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +219 -11
- airbyte_cdk/sources/declarative/requesters/query_properties/__init__.py +13 -0
- airbyte_cdk/sources/declarative/requesters/query_properties/properties_from_endpoint.py +40 -0
- airbyte_cdk/sources/declarative/requesters/query_properties/property_chunking.py +69 -0
- airbyte_cdk/sources/declarative/requesters/query_properties/query_properties.py +58 -0
- airbyte_cdk/sources/declarative/requesters/query_properties/strategies/__init__.py +10 -0
- airbyte_cdk/sources/declarative/requesters/query_properties/strategies/group_by_key.py +33 -0
- airbyte_cdk/sources/declarative/requesters/query_properties/strategies/merge_strategy.py +19 -0
- airbyte_cdk/sources/declarative/requesters/request_options/interpolated_request_options_provider.py +25 -2
- airbyte_cdk/sources/declarative/retrievers/simple_retriever.py +101 -30
- {airbyte_cdk-6.43.1.dist-info → airbyte_cdk-6.45.0.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.43.1.dist-info → airbyte_cdk-6.45.0.dist-info}/RECORD +20 -13
- {airbyte_cdk-6.43.1.dist-info → airbyte_cdk-6.45.0.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.43.1.dist-info → airbyte_cdk-6.45.0.dist-info}/LICENSE_SHORT +0 -0
- {airbyte_cdk-6.43.1.dist-info → airbyte_cdk-6.45.0.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.43.1.dist-info → airbyte_cdk-6.45.0.dist-info}/entry_points.txt +0 -0
@@ -7,7 +7,10 @@ from typing import Mapping
|
|
7
7
|
from pydantic.v1 import BaseModel
|
8
8
|
|
9
9
|
from airbyte_cdk.sources.declarative.checks.check_dynamic_stream import CheckDynamicStream
|
10
|
-
from airbyte_cdk.sources.declarative.checks.check_stream import
|
10
|
+
from airbyte_cdk.sources.declarative.checks.check_stream import (
|
11
|
+
CheckStream,
|
12
|
+
DynamicStreamCheckConfig,
|
13
|
+
)
|
11
14
|
from airbyte_cdk.sources.declarative.checks.connection_checker import ConnectionChecker
|
12
15
|
from airbyte_cdk.sources.declarative.models import (
|
13
16
|
CheckDynamicStream as CheckDynamicStreamModel,
|
@@ -21,4 +24,4 @@ COMPONENTS_CHECKER_TYPE_MAPPING: Mapping[str, type[BaseModel]] = {
|
|
21
24
|
"CheckDynamicStream": CheckDynamicStreamModel,
|
22
25
|
}
|
23
26
|
|
24
|
-
__all__ = ["CheckStream", "CheckDynamicStream", "ConnectionChecker"]
|
27
|
+
__all__ = ["CheckStream", "CheckDynamicStream", "ConnectionChecker", "DynamicStreamCheckConfig"]
|
@@ -5,13 +5,23 @@
|
|
5
5
|
import logging
|
6
6
|
import traceback
|
7
7
|
from dataclasses import InitVar, dataclass
|
8
|
-
from typing import Any, List, Mapping, Tuple
|
8
|
+
from typing import Any, Dict, List, Mapping, Optional, Tuple
|
9
9
|
|
10
10
|
from airbyte_cdk import AbstractSource
|
11
11
|
from airbyte_cdk.sources.declarative.checks.connection_checker import ConnectionChecker
|
12
12
|
from airbyte_cdk.sources.streams.http.availability_strategy import HttpAvailabilityStrategy
|
13
13
|
|
14
14
|
|
15
|
+
@dataclass(frozen=True)
|
16
|
+
class DynamicStreamCheckConfig:
|
17
|
+
"""Defines the configuration for dynamic stream during connection checking. This class specifies
|
18
|
+
what dynamic streams in the stream template should be updated with value, supporting dynamic interpolation
|
19
|
+
and type enforcement."""
|
20
|
+
|
21
|
+
dynamic_stream_name: str
|
22
|
+
stream_count: int = 0
|
23
|
+
|
24
|
+
|
15
25
|
@dataclass
|
16
26
|
class CheckStream(ConnectionChecker):
|
17
27
|
"""
|
@@ -23,34 +33,126 @@ class CheckStream(ConnectionChecker):
|
|
23
33
|
|
24
34
|
stream_names: List[str]
|
25
35
|
parameters: InitVar[Mapping[str, Any]]
|
36
|
+
dynamic_streams_check_configs: Optional[List[DynamicStreamCheckConfig]] = None
|
26
37
|
|
27
38
|
def __post_init__(self, parameters: Mapping[str, Any]) -> None:
|
28
39
|
self._parameters = parameters
|
40
|
+
if self.dynamic_streams_check_configs is None:
|
41
|
+
self.dynamic_streams_check_configs = []
|
42
|
+
|
43
|
+
def _log_error(self, logger: logging.Logger, action: str, error: Exception) -> Tuple[bool, str]:
|
44
|
+
"""Logs an error and returns a formatted error message."""
|
45
|
+
error_message = f"Encountered an error while {action}. Error: {error}"
|
46
|
+
logger.error(error_message + f"Error traceback: \n {traceback.format_exc()}", exc_info=True)
|
47
|
+
return False, error_message
|
29
48
|
|
30
49
|
def check_connection(
|
31
50
|
self, source: AbstractSource, logger: logging.Logger, config: Mapping[str, Any]
|
32
51
|
) -> Tuple[bool, Any]:
|
33
|
-
|
52
|
+
"""Checks the connection to the source and its streams."""
|
53
|
+
try:
|
54
|
+
streams = source.streams(config=config)
|
55
|
+
if not streams:
|
56
|
+
return False, f"No streams to connect to from source {source}"
|
57
|
+
except Exception as error:
|
58
|
+
return self._log_error(logger, "discovering streams", error)
|
59
|
+
|
34
60
|
stream_name_to_stream = {s.name: s for s in streams}
|
35
|
-
if len(streams) == 0:
|
36
|
-
return False, f"No streams to connect to from source {source}"
|
37
61
|
for stream_name in self.stream_names:
|
38
|
-
if stream_name not in stream_name_to_stream
|
62
|
+
if stream_name not in stream_name_to_stream:
|
39
63
|
raise ValueError(
|
40
|
-
f"{stream_name} is not part of the catalog. Expected one of {stream_name_to_stream.keys()}."
|
64
|
+
f"{stream_name} is not part of the catalog. Expected one of {list(stream_name_to_stream.keys())}."
|
41
65
|
)
|
42
66
|
|
67
|
+
stream_availability, message = self._check_stream_availability(
|
68
|
+
stream_name_to_stream, stream_name, logger
|
69
|
+
)
|
70
|
+
if not stream_availability:
|
71
|
+
return stream_availability, message
|
72
|
+
|
73
|
+
should_check_dynamic_streams = (
|
74
|
+
hasattr(source, "resolved_manifest")
|
75
|
+
and hasattr(source, "dynamic_streams")
|
76
|
+
and self.dynamic_streams_check_configs
|
77
|
+
)
|
78
|
+
|
79
|
+
if should_check_dynamic_streams:
|
80
|
+
return self._check_dynamic_streams_availability(source, stream_name_to_stream, logger)
|
81
|
+
|
82
|
+
return True, None
|
83
|
+
|
84
|
+
def _check_stream_availability(
|
85
|
+
self, stream_name_to_stream: Dict[str, Any], stream_name: str, logger: logging.Logger
|
86
|
+
) -> Tuple[bool, Any]:
|
87
|
+
"""Checks if streams are available."""
|
88
|
+
availability_strategy = HttpAvailabilityStrategy()
|
89
|
+
try:
|
43
90
|
stream = stream_name_to_stream[stream_name]
|
44
|
-
|
91
|
+
stream_is_available, reason = availability_strategy.check_availability(stream, logger)
|
92
|
+
if not stream_is_available:
|
93
|
+
message = f"Stream {stream_name} is not available: {reason}"
|
94
|
+
logger.warning(message)
|
95
|
+
return stream_is_available, message
|
96
|
+
except Exception as error:
|
97
|
+
return self._log_error(logger, f"checking availability of stream {stream_name}", error)
|
98
|
+
return True, None
|
99
|
+
|
100
|
+
def _check_dynamic_streams_availability(
|
101
|
+
self, source: AbstractSource, stream_name_to_stream: Dict[str, Any], logger: logging.Logger
|
102
|
+
) -> Tuple[bool, Any]:
|
103
|
+
"""Checks the availability of dynamic streams."""
|
104
|
+
dynamic_streams = source.resolved_manifest.get("dynamic_streams", []) # type: ignore[attr-defined] # The source's resolved_manifest manifest is checked before calling this method
|
105
|
+
dynamic_stream_name_to_dynamic_stream = {
|
106
|
+
ds.get("name", f"dynamic_stream_{i}"): ds for i, ds in enumerate(dynamic_streams)
|
107
|
+
}
|
108
|
+
generated_streams = self._map_generated_streams(source.dynamic_streams) # type: ignore[attr-defined] # The source's dynamic_streams manifest is checked before calling this method
|
109
|
+
|
110
|
+
for check_config in self.dynamic_streams_check_configs: # type: ignore[union-attr] # None value for self.dynamic_streams_check_configs handled in __post_init__
|
111
|
+
if check_config.dynamic_stream_name not in dynamic_stream_name_to_dynamic_stream:
|
112
|
+
return (
|
113
|
+
False,
|
114
|
+
f"Dynamic stream {check_config.dynamic_stream_name} is not found in manifest.",
|
115
|
+
)
|
116
|
+
|
117
|
+
generated = generated_streams.get(check_config.dynamic_stream_name, [])
|
118
|
+
stream_availability, message = self._check_generated_streams_availability(
|
119
|
+
generated, stream_name_to_stream, logger, check_config.stream_count
|
120
|
+
)
|
121
|
+
if not stream_availability:
|
122
|
+
return stream_availability, message
|
123
|
+
|
124
|
+
return True, None
|
125
|
+
|
126
|
+
def _map_generated_streams(
|
127
|
+
self, dynamic_streams: List[Dict[str, Any]]
|
128
|
+
) -> Dict[str, List[Dict[str, Any]]]:
|
129
|
+
"""Maps dynamic stream names to their corresponding generated streams."""
|
130
|
+
mapped_streams: Dict[str, List[Dict[str, Any]]] = {}
|
131
|
+
for stream in dynamic_streams:
|
132
|
+
mapped_streams.setdefault(stream["dynamic_stream_name"], []).append(stream)
|
133
|
+
return mapped_streams
|
134
|
+
|
135
|
+
def _check_generated_streams_availability(
|
136
|
+
self,
|
137
|
+
generated_streams: List[Dict[str, Any]],
|
138
|
+
stream_name_to_stream: Dict[str, Any],
|
139
|
+
logger: logging.Logger,
|
140
|
+
max_count: int,
|
141
|
+
) -> Tuple[bool, Any]:
|
142
|
+
"""Checks availability of generated dynamic streams."""
|
143
|
+
availability_strategy = HttpAvailabilityStrategy()
|
144
|
+
for declarative_stream in generated_streams[: min(max_count, len(generated_streams))]:
|
145
|
+
stream = stream_name_to_stream[declarative_stream["name"]]
|
45
146
|
try:
|
46
147
|
stream_is_available, reason = availability_strategy.check_availability(
|
47
148
|
stream, logger
|
48
149
|
)
|
49
150
|
if not stream_is_available:
|
50
|
-
|
151
|
+
message = f"Dynamic Stream {stream.name} is not available: {reason}"
|
152
|
+
logger.warning(message)
|
153
|
+
return False, message
|
51
154
|
except Exception as error:
|
52
|
-
|
53
|
-
f"
|
155
|
+
return self._log_error(
|
156
|
+
logger, f"checking availability of dynamic stream {stream.name}", error
|
54
157
|
)
|
55
|
-
return False, f"Unable to connect to stream {stream_name} - {error}"
|
56
158
|
return True, None
|
@@ -316,7 +316,6 @@ definitions:
|
|
316
316
|
type: object
|
317
317
|
required:
|
318
318
|
- type
|
319
|
-
- stream_names
|
320
319
|
properties:
|
321
320
|
type:
|
322
321
|
type: string
|
@@ -330,6 +329,28 @@ definitions:
|
|
330
329
|
examples:
|
331
330
|
- ["users"]
|
332
331
|
- ["users", "contacts"]
|
332
|
+
dynamic_streams_check_configs:
|
333
|
+
type: array
|
334
|
+
items:
|
335
|
+
"$ref": "#/definitions/DynamicStreamCheckConfig"
|
336
|
+
DynamicStreamCheckConfig:
|
337
|
+
type: object
|
338
|
+
required:
|
339
|
+
- type
|
340
|
+
- dynamic_stream_name
|
341
|
+
properties:
|
342
|
+
type:
|
343
|
+
type: string
|
344
|
+
enum: [DynamicStreamCheckConfig]
|
345
|
+
dynamic_stream_name:
|
346
|
+
title: Dynamic Stream Name
|
347
|
+
description: The dynamic stream name.
|
348
|
+
type: string
|
349
|
+
stream_count:
|
350
|
+
title: Stream Count
|
351
|
+
description: The number of streams to attempt reading from during a check operation. If `stream_count` exceeds the total number of available streams, the minimum of the two values will be used.
|
352
|
+
type: integer
|
353
|
+
default: 0
|
333
354
|
CheckDynamicStream:
|
334
355
|
title: Dynamic Streams to Check
|
335
356
|
description: (This component is experimental. Use at your own risk.) Defines the dynamic streams to try reading when running a check operation.
|
@@ -1731,6 +1752,30 @@ definitions:
|
|
1731
1752
|
$parameters:
|
1732
1753
|
type: object
|
1733
1754
|
additionalProperties: true
|
1755
|
+
GroupByKeyMergeStrategy:
|
1756
|
+
title: Group by Key
|
1757
|
+
description: Record merge strategy that combines records according to fields on the record.
|
1758
|
+
required:
|
1759
|
+
- type
|
1760
|
+
- key
|
1761
|
+
properties:
|
1762
|
+
type:
|
1763
|
+
type: string
|
1764
|
+
enum: [GroupByKeyMergeStrategy]
|
1765
|
+
key:
|
1766
|
+
title: Key
|
1767
|
+
description: The name of the field on the record whose value will be used to group properties that were retrieved through multiple API requests.
|
1768
|
+
anyOf:
|
1769
|
+
- type: string
|
1770
|
+
- type: array
|
1771
|
+
items:
|
1772
|
+
type: string
|
1773
|
+
examples:
|
1774
|
+
- "id"
|
1775
|
+
- ["parent_id", "end_date"]
|
1776
|
+
$parameters:
|
1777
|
+
type: object
|
1778
|
+
additionalProperties: true
|
1734
1779
|
SessionTokenAuthenticator:
|
1735
1780
|
type: object
|
1736
1781
|
required:
|
@@ -1950,7 +1995,9 @@ definitions:
|
|
1950
1995
|
- type: string
|
1951
1996
|
- type: object
|
1952
1997
|
additionalProperties:
|
1953
|
-
|
1998
|
+
anyOf:
|
1999
|
+
- type: string
|
2000
|
+
- $ref": "#/definitions/QueryProperties"
|
1954
2001
|
interpolation_context:
|
1955
2002
|
- next_page_token
|
1956
2003
|
- stream_interval
|
@@ -2968,6 +3015,96 @@ definitions:
|
|
2968
3015
|
examples:
|
2969
3016
|
- id
|
2970
3017
|
- ["code", "type"]
|
3018
|
+
PropertiesFromEndpoint:
|
3019
|
+
title: Properties from Endpoint
|
3020
|
+
description: Defines the behavior for fetching the list of properties from an API that will be loaded into the requests to extract records.
|
3021
|
+
type: object
|
3022
|
+
required:
|
3023
|
+
- type
|
3024
|
+
- property_field_path
|
3025
|
+
- retriever
|
3026
|
+
properties:
|
3027
|
+
type:
|
3028
|
+
type: string
|
3029
|
+
enum: [PropertiesFromEndpoint]
|
3030
|
+
property_field_path:
|
3031
|
+
description: Describes the path to the field that should be extracted
|
3032
|
+
type: array
|
3033
|
+
items:
|
3034
|
+
type: string
|
3035
|
+
examples:
|
3036
|
+
- ["name"]
|
3037
|
+
interpolation_context:
|
3038
|
+
- config
|
3039
|
+
- parameters
|
3040
|
+
retriever:
|
3041
|
+
description: Requester component that describes how to fetch the properties to query from a remote API endpoint.
|
3042
|
+
anyOf:
|
3043
|
+
- "$ref": "#/definitions/CustomRetriever"
|
3044
|
+
- "$ref": "#/definitions/SimpleRetriever"
|
3045
|
+
$parameters:
|
3046
|
+
type: object
|
3047
|
+
additionalProperties: true
|
3048
|
+
PropertyChunking:
|
3049
|
+
title: Property Chunking
|
3050
|
+
description: For APIs with restrictions on the amount of properties that can be requester per request, property chunking can be applied to make multiple requests with a subset of the properties.
|
3051
|
+
type: object
|
3052
|
+
required:
|
3053
|
+
- type
|
3054
|
+
- property_limit_type
|
3055
|
+
properties:
|
3056
|
+
type:
|
3057
|
+
type: string
|
3058
|
+
enum: [PropertyChunking]
|
3059
|
+
property_limit_type:
|
3060
|
+
title: Property Limit Type
|
3061
|
+
description: The type used to determine the maximum number of properties per chunk
|
3062
|
+
enum:
|
3063
|
+
- characters
|
3064
|
+
- property_count
|
3065
|
+
property_limit:
|
3066
|
+
title: Property Limit
|
3067
|
+
description: The maximum amount of properties that can be retrieved per request according to the limit type.
|
3068
|
+
type: integer
|
3069
|
+
record_merge_strategy:
|
3070
|
+
title: Record Merge Strategy
|
3071
|
+
description: Dictates how to records that require multiple requests to get all properties should be emitted to the destination
|
3072
|
+
"$ref": "#/definitions/GroupByKeyMergeStrategy"
|
3073
|
+
$parameters:
|
3074
|
+
type: object
|
3075
|
+
additionalProperties: true
|
3076
|
+
QueryProperties:
|
3077
|
+
title: Query Properties
|
3078
|
+
description: For APIs that require explicit specification of the properties to query for, this component specifies which property fields and how they are supplied to outbound requests.
|
3079
|
+
type: object
|
3080
|
+
required:
|
3081
|
+
- type
|
3082
|
+
- property_list
|
3083
|
+
properties:
|
3084
|
+
type:
|
3085
|
+
type: string
|
3086
|
+
enum: [QueryProperties]
|
3087
|
+
property_list:
|
3088
|
+
title: Property List
|
3089
|
+
description: The set of properties that will be queried for in the outbound request. This can either be statically defined or dynamic based on an API endpoint
|
3090
|
+
anyOf:
|
3091
|
+
- type: array
|
3092
|
+
items:
|
3093
|
+
type: string
|
3094
|
+
- "$ref": "#/definitions/PropertiesFromEndpoint"
|
3095
|
+
always_include_properties:
|
3096
|
+
title: Always Include Properties
|
3097
|
+
description: The list of properties that should be included in every set of properties when multiple chunks of properties are being requested.
|
3098
|
+
type: array
|
3099
|
+
items:
|
3100
|
+
type: string
|
3101
|
+
property_chunking:
|
3102
|
+
title: Property Chunking
|
3103
|
+
description: Defines how query properties will be grouped into smaller sets for APIs with limitations on the number of properties fetched per API request.
|
3104
|
+
"$ref": "#/definitions/PropertyChunking"
|
3105
|
+
$parameters:
|
3106
|
+
type: object
|
3107
|
+
additionalProperties: true
|
2971
3108
|
RecordFilter:
|
2972
3109
|
title: Record Filter
|
2973
3110
|
description: Filter applied on a list of records.
|
@@ -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
|
|
@@ -42,13 +44,15 @@ class BearerAuthenticator(BaseModel):
|
|
42
44
|
parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
|
43
45
|
|
44
46
|
|
45
|
-
class
|
46
|
-
type: Literal["
|
47
|
-
|
48
|
-
...,
|
49
|
-
|
50
|
-
|
51
|
-
|
47
|
+
class DynamicStreamCheckConfig(BaseModel):
|
48
|
+
type: Literal["DynamicStreamCheckConfig"]
|
49
|
+
dynamic_stream_name: str = Field(
|
50
|
+
..., description="The dynamic stream name.", title="Dynamic Stream Name"
|
51
|
+
)
|
52
|
+
stream_count: Optional[int] = Field(
|
53
|
+
0,
|
54
|
+
description="The number of streams to attempt reading from during a check operation. If `stream_count` exceeds the total number of available streams, the minimum of the two values will be used.",
|
55
|
+
title="Stream Count",
|
52
56
|
)
|
53
57
|
|
54
58
|
|
@@ -716,6 +720,17 @@ class ExponentialBackoffStrategy(BaseModel):
|
|
716
720
|
parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
|
717
721
|
|
718
722
|
|
723
|
+
class GroupByKeyMergeStrategy(BaseModel):
|
724
|
+
type: Literal["GroupByKeyMergeStrategy"]
|
725
|
+
key: Union[str, List[str]] = Field(
|
726
|
+
...,
|
727
|
+
description="The name of the field on the record whose value will be used to group properties that were retrieved through multiple API requests.",
|
728
|
+
examples=["id", ["parent_id", "end_date"]],
|
729
|
+
title="Key",
|
730
|
+
)
|
731
|
+
parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
|
732
|
+
|
733
|
+
|
719
734
|
class SessionTokenRequestBearerAuthenticator(BaseModel):
|
720
735
|
type: Literal["Bearer"]
|
721
736
|
|
@@ -1187,6 +1202,31 @@ class PrimaryKey(BaseModel):
|
|
1187
1202
|
)
|
1188
1203
|
|
1189
1204
|
|
1205
|
+
class PropertyLimitType(Enum):
|
1206
|
+
characters = "characters"
|
1207
|
+
property_count = "property_count"
|
1208
|
+
|
1209
|
+
|
1210
|
+
class PropertyChunking(BaseModel):
|
1211
|
+
type: Literal["PropertyChunking"]
|
1212
|
+
property_limit_type: PropertyLimitType = Field(
|
1213
|
+
...,
|
1214
|
+
description="The type used to determine the maximum number of properties per chunk",
|
1215
|
+
title="Property Limit Type",
|
1216
|
+
)
|
1217
|
+
property_limit: Optional[int] = Field(
|
1218
|
+
None,
|
1219
|
+
description="The maximum amount of properties that can be retrieved per request according to the limit type.",
|
1220
|
+
title="Property Limit",
|
1221
|
+
)
|
1222
|
+
record_merge_strategy: Optional[GroupByKeyMergeStrategy] = Field(
|
1223
|
+
None,
|
1224
|
+
description="Dictates how to records that require multiple requests to get all properties should be emitted to the destination",
|
1225
|
+
title="Record Merge Strategy",
|
1226
|
+
)
|
1227
|
+
parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
|
1228
|
+
|
1229
|
+
|
1190
1230
|
class RecordFilter(BaseModel):
|
1191
1231
|
type: Literal["RecordFilter"]
|
1192
1232
|
condition: Optional[str] = Field(
|
@@ -1523,6 +1563,17 @@ class AuthFlow(BaseModel):
|
|
1523
1563
|
oauth_config_specification: Optional[OAuthConfigSpecification] = None
|
1524
1564
|
|
1525
1565
|
|
1566
|
+
class CheckStream(BaseModel):
|
1567
|
+
type: Literal["CheckStream"]
|
1568
|
+
stream_names: Optional[List[str]] = Field(
|
1569
|
+
None,
|
1570
|
+
description="Names of the streams to try reading from when running a check operation.",
|
1571
|
+
examples=[["users"], ["users", "contacts"]],
|
1572
|
+
title="Stream Names",
|
1573
|
+
)
|
1574
|
+
dynamic_streams_check_configs: Optional[List[DynamicStreamCheckConfig]] = None
|
1575
|
+
|
1576
|
+
|
1526
1577
|
class IncrementingCountCursor(BaseModel):
|
1527
1578
|
type: Literal["IncrementingCountCursor"]
|
1528
1579
|
cursor_field: str = Field(
|
@@ -2174,7 +2225,7 @@ class HttpRequester(BaseModel):
|
|
2174
2225
|
examples=[{"Output-Format": "JSON"}, {"Version": "{{ config['version'] }}"}],
|
2175
2226
|
title="Request Headers",
|
2176
2227
|
)
|
2177
|
-
request_parameters: Optional[Union[str, Dict[str, str]]] = Field(
|
2228
|
+
request_parameters: Optional[Union[str, Dict[str, Union[str, Any]]]] = Field(
|
2178
2229
|
None,
|
2179
2230
|
description="Specifies the query parameters that should be set on an outgoing HTTP request given the inputs.",
|
2180
2231
|
examples=[
|
@@ -2264,6 +2315,40 @@ class ParentStreamConfig(BaseModel):
|
|
2264
2315
|
parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
|
2265
2316
|
|
2266
2317
|
|
2318
|
+
class PropertiesFromEndpoint(BaseModel):
|
2319
|
+
type: Literal["PropertiesFromEndpoint"]
|
2320
|
+
property_field_path: List[str] = Field(
|
2321
|
+
...,
|
2322
|
+
description="Describes the path to the field that should be extracted",
|
2323
|
+
examples=[["name"]],
|
2324
|
+
)
|
2325
|
+
retriever: Union[CustomRetriever, SimpleRetriever] = Field(
|
2326
|
+
...,
|
2327
|
+
description="Requester component that describes how to fetch the properties to query from a remote API endpoint.",
|
2328
|
+
)
|
2329
|
+
parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
|
2330
|
+
|
2331
|
+
|
2332
|
+
class QueryProperties(BaseModel):
|
2333
|
+
type: Literal["QueryProperties"]
|
2334
|
+
property_list: Union[List[str], PropertiesFromEndpoint] = Field(
|
2335
|
+
...,
|
2336
|
+
description="The set of properties that will be queried for in the outbound request. This can either be statically defined or dynamic based on an API endpoint",
|
2337
|
+
title="Property List",
|
2338
|
+
)
|
2339
|
+
always_include_properties: Optional[List[str]] = Field(
|
2340
|
+
None,
|
2341
|
+
description="The list of properties that should be included in every set of properties when multiple chunks of properties are being requested.",
|
2342
|
+
title="Always Include Properties",
|
2343
|
+
)
|
2344
|
+
property_chunking: Optional[PropertyChunking] = Field(
|
2345
|
+
None,
|
2346
|
+
description="Defines how query properties will be grouped into smaller sets for APIs with limitations on the number of properties fetched per API request.",
|
2347
|
+
title="Property Chunking",
|
2348
|
+
)
|
2349
|
+
parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
|
2350
|
+
|
2351
|
+
|
2267
2352
|
class StateDelegatingStream(BaseModel):
|
2268
2353
|
type: Literal["StateDelegatingStream"]
|
2269
2354
|
name: str = Field(..., description="The stream name.", example=["Users"], title="Name")
|
@@ -2512,5 +2597,6 @@ DeclarativeStream.update_forward_refs()
|
|
2512
2597
|
SessionTokenAuthenticator.update_forward_refs()
|
2513
2598
|
DynamicSchemaLoader.update_forward_refs()
|
2514
2599
|
ParentStreamConfig.update_forward_refs()
|
2600
|
+
PropertiesFromEndpoint.update_forward_refs()
|
2515
2601
|
SimpleRetriever.update_forward_refs()
|
2516
2602
|
AsyncRetriever.update_forward_refs()
|