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
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3801,6 +3801,22 @@ definitions:
3801
3801
title: Incremental Stream
3802
3802
description: Component used to coordinate how records are extracted across stream slices and request pages when the state provided.
3803
3803
"$ref": "#/definitions/DeclarativeStream"
3804
+
api_retention_period:
3805
+
title: API Retention Period
3806
+
description: |
3807
+
The data retention period of the incremental API (ISO8601 duration). If the cursor value is older than this retention period, the connector will automatically fall back to a full refresh to avoid data loss.
3808
+
This is useful for APIs like Stripe Events API which only retain data for 30 days.
Copy file name to clipboardExpand all lines: airbyte_cdk/sources/declarative/models/declarative_component_schema.py
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,3 @@
1
-
# Copyright (c) 2025 Airbyte, Inc., all rights reserved.
2
-
3
1
# generated by datamodel-codegen:
4
2
# filename: declarative_component_schema.yaml
5
3
@@ -2922,6 +2920,12 @@ class StateDelegatingStream(BaseModel):
2922
2920
description="Component used to coordinate how records are extracted across stream slices and request pages when the state provided.",
2923
2921
title="Incremental Stream",
2924
2922
)
2923
+
api_retention_period: Optional[str] =Field(
2924
+
None,
2925
+
description="The data retention period of the incremental API (ISO8601 duration). If the cursor value is older than this retention period, the connector will automatically fall back to a full refresh to avoid data loss.\nThis is useful for APIs like Stripe Events API which only retain data for 30 days.\n * **PT1H**: 1 hour\n * **P1D**: 1 day\n * **P1W**: 1 week\n * **P1M**: 1 month\n * **P1Y**: 1 year\n * **P30D**: 30 days\n",
f"state_delegating_stream, full_refresh_stream name and incremental_stream must have equal names. Instead has {model.name}, {model.full_refresh_stream.name} and {model.incremental_stream.name}."
returnself._create_component_from_model(stream_model, config=config, **kwargs) # type: ignore[no-any-return] # DeclarativeStream will be created as stream_model is alwyas DeclarativeStreamModel
# We assume the child state is a pair `{<cursor_field>: <cursor_value>}` and we will use the
3972
-
# cursor value as a parent state.
3973
4072
incremental_sync_model: Union[
3974
4073
DatetimeBasedCursorModel,
3975
4074
IncrementingCountCursorModel,
3976
4075
] = (
3977
4076
model.stream.incremental_sync# type: ignore # if we are there, it is because there is incremental_dependency and therefore there is an incremental_sync on the parent stream
0 commit comments