You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: airbyte_cdk/sources/declarative/declarative_component_schema.yaml
+22-1Lines changed: 22 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -512,9 +512,16 @@ definitions:
512
512
page_size:
513
513
title: Page Size
514
514
description: The number of records to include in each pages.
515
-
type: integer
515
+
anyOf:
516
+
- type: integer
517
+
title: Number of Records
518
+
- type: string
519
+
title: Interpolated Value
520
+
interpolation_context:
521
+
- config
516
522
examples:
517
523
- 100
524
+
- "{{ config['page_size'] }}"
518
525
stop_condition:
519
526
title: Stop Condition
520
527
description: Template string evaluating when to stop paginating.
@@ -2067,6 +2074,18 @@ definitions:
2067
2074
field_name: Authorization
2068
2075
- inject_into: request_parameter
2069
2076
field_name: authKey
2077
+
api_token:
2078
+
title: API Token Template
2079
+
description: 'A template for the token value to inject. Use {{ session_token }} to reference the session token. For example, use "Token {{ session_token }}" for APIs that expect "Authorization: Token <token>".'
2080
+
type: string
2081
+
default: "{{ session_token }}"
2082
+
interpolation_context:
2083
+
- config
2084
+
- session_token
2085
+
examples:
2086
+
- "{{ session_token }}"
2087
+
- "Token {{ session_token }}"
2088
+
- "Bearer {{ session_token }}"
2070
2089
SessionTokenRequestBearerAuthenticator:
2071
2090
title: Bearer Authenticator
2072
2091
description: Authenticator for requests using the session token as a standard bearer token.
@@ -2312,13 +2331,15 @@ definitions:
2312
2331
- IGNORE
2313
2332
- RESET_PAGINATION
2314
2333
- RATE_LIMITED
2334
+
- REFRESH_TOKEN_THEN_RETRY
2315
2335
examples:
2316
2336
- SUCCESS
2317
2337
- FAIL
2318
2338
- RETRY
2319
2339
- IGNORE
2320
2340
- RESET_PAGINATION
2321
2341
- RATE_LIMITED
2342
+
- REFRESH_TOKEN_THEN_RETRY
2322
2343
failure_type:
2323
2344
title: Failure Type
2324
2345
description: Failure type of traced exception if a response matches the filter.
@@ -563,6 +564,7 @@ class HttpResponseFilter(BaseModel):
563
564
"IGNORE",
564
565
"RESET_PAGINATION",
565
566
"RATE_LIMITED",
567
+
"REFRESH_TOKEN_THEN_RETRY",
566
568
],
567
569
title="Action",
568
570
)
@@ -2057,6 +2059,16 @@ class SessionTokenRequestApiKeyAuthenticator(BaseModel):
2057
2059
],
2058
2060
title="Inject API Key Into Outgoing HTTP Request",
2059
2061
)
2062
+
api_token: Optional[str] =Field(
2063
+
"{{ session_token }}",
2064
+
description='A template for the token value to inject. Use {{ session_token }} to reference the session token. For example, use "Token {{ session_token }}" for APIs that expect "Authorization: Token <token>".',
2065
+
examples=[
2066
+
"{{ session_token }}",
2067
+
"Token {{ session_token }}",
2068
+
"Bearer {{ session_token }}",
2069
+
],
2070
+
title="API Token Template",
2071
+
)
2060
2072
2061
2073
2062
2074
classJsonSchemaPropertySelector(BaseModel):
@@ -2741,7 +2753,7 @@ class HttpRequester(BaseModelWithDeprecations):
2741
2753
)
2742
2754
use_cache: Optional[bool] =Field(
2743
2755
False,
2744
-
description="Enables stream requests caching. This field is automatically set by the CDK.",
2756
+
description="Enables stream requests caching. When set to true, repeated requests to the same URL will return cached responses. Parent streams automatically have caching enabled. Only set this to false if you are certain that caching should be disabled, as it may negatively impact performance when the same data is needed multiple times (e.g., for scroll-based pagination APIs where caching causes duplicate records).",
start=interpolated_start_value, # type: ignore # Having issues w/ inspection for GapType and CursorValueType as shown in existing tests. Confirmed functionality is working in practice
1611
+
start=evaluated_start_value, # type: ignore # Having issues w/ inspection for GapType and CursorValueType as shown in existing tests. Confirmed functionality is working in practice
1597
1612
end_provider=connector_state_converter.get_end_provider(), # type: ignore # Having issues w/ inspection for GapType and CursorValueType as shown in existing tests. Confirmed functionality is working in practice
pattern_descriptor="YYYY-MM-DD, YYYY-MM-DDTHH:mm:ssZ, or YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
60
66
order=1,
61
67
)
62
68
69
+
@validator("start_date", pre=True)
70
+
defvalidate_start_date(
71
+
cls, # noqa: N805 # Pydantic validators use cls, not self
72
+
v: Optional[str],
73
+
) ->Optional[str]:
74
+
"""Validate that start_date is a parseable datetime string.
75
+
76
+
Uses ab_datetime_try_parse which accepts any common ISO8601/RFC3339 format,
77
+
including formats with or without microseconds (e.g., both
78
+
'2021-01-01T00:00:00Z' and '2021-01-01T00:00:00.000000Z' are valid).
79
+
"""
80
+
ifvisNone:
81
+
returnv
82
+
parsed=ab_datetime_try_parse(v)
83
+
ifparsedisNone:
84
+
raiseValueError(
85
+
f"'{v}' is not a valid datetime string. "
86
+
"Please use a format like '2021-01-01T00:00:00Z' or '2021-01-01T00:00:00.000000Z'."
87
+
)
88
+
returnv
89
+
63
90
streams: List[FileBasedStreamConfig] =Field(
64
91
title="The list of streams to sync",
65
92
description='Each instance of this configuration defines a <a href="https://docs.airbyte.com/cloud/core-concepts#stream">stream</a>. Use this to define which files belong in the stream, their format, and how they should be parsed and validated. When sending data to warehouse destination such as Snowflake or BigQuery, each stream is a separate table.',
0 commit comments