diff --git a/airbyte_cdk/sources/declarative/declarative_component_schema.yaml b/airbyte_cdk/sources/declarative/declarative_component_schema.yaml index e1a2532b0..603a88e03 100644 --- a/airbyte_cdk/sources/declarative/declarative_component_schema.yaml +++ b/airbyte_cdk/sources/declarative/declarative_component_schema.yaml @@ -3121,15 +3121,12 @@ definitions: type: type: string enum: [ParentStreamConfig] - lazy_read_pointer: - title: Lazy Read Pointer - description: If set, this will enable lazy reading, using the initial read of parent records to extract child records. - type: array - default: [] - items: - type: string - interpolation_context: - - config + stream: + title: Parent Stream + description: Reference to the parent stream. + anyOf: + - "$ref": "#/definitions/DeclarativeStream" + - "$ref": "#/definitions/StateDelegatingStream" parent_key: title: Parent Key description: The primary key of records from the parent stream that will be used during the retrieval of records for the current substream. This parent identifier field is typically a characteristic of the child records being extracted from the source API. @@ -3137,12 +3134,6 @@ definitions: examples: - "id" - "{{ config['parent_record_id'] }}" - stream: - title: Parent Stream - description: Reference to the parent stream. - anyOf: - - "$ref": "#/definitions/DeclarativeStream" - - "$ref": "#/definitions/StateDelegatingStream" partition_field: title: Current Parent Key Value Identifier description: While iterating over parent records during a sync, the parent_key value can be referenced by using this field. @@ -3159,6 +3150,15 @@ definitions: description: Indicates whether the parent stream should be read incrementally based on updates in the child stream. type: boolean default: false + lazy_read_pointer: + title: Lazy Read Pointer + description: If set, this will enable lazy reading, using the initial read of parent records to extract child records. + type: array + default: [] + items: + type: string + interpolation_context: + - config extra_fields: title: Extra Fields description: Array of field paths to include as additional fields in the stream slice. Each path is an array of strings representing keys to access fields in the respective parent record. Accessible via `stream_slice.extra_fields`. Missing fields are set to `None`. @@ -3592,18 +3592,18 @@ definitions: default: false partition_router: title: Partition Router - description: PartitionRouter component that describes how to partition the stream, enabling incremental syncs and checkpointing. - default: [] + description: Used to iteratively execute requests over a set of values, such as a parent stream's records or a list of constant values. anyOf: - - "$ref": "#/definitions/ListPartitionRouter" - "$ref": "#/definitions/SubstreamPartitionRouter" + - "$ref": "#/definitions/ListPartitionRouter" - "$ref": "#/definitions/GroupingPartitionRouter" - "$ref": "#/definitions/CustomPartitionRouter" - type: array + title: Multiple Partition Routers items: anyOf: - - "$ref": "#/definitions/ListPartitionRouter" - "$ref": "#/definitions/SubstreamPartitionRouter" + - "$ref": "#/definitions/ListPartitionRouter" - "$ref": "#/definitions/GroupingPartitionRouter" - "$ref": "#/definitions/CustomPartitionRouter" $parameters: diff --git a/airbyte_cdk/sources/declarative/models/declarative_component_schema.py b/airbyte_cdk/sources/declarative/models/declarative_component_schema.py index f0f2d5966..1644071a4 100644 --- a/airbyte_cdk/sources/declarative/models/declarative_component_schema.py +++ b/airbyte_cdk/sources/declarative/models/declarative_component_schema.py @@ -2648,10 +2648,8 @@ class DynamicSchemaLoader(BaseModel): class ParentStreamConfig(BaseModel): type: Literal["ParentStreamConfig"] - lazy_read_pointer: Optional[List[str]] = Field( - [], - description="If set, this will enable lazy reading, using the initial read of parent records to extract child records.", - title="Lazy Read Pointer", + stream: Union[DeclarativeStream, StateDelegatingStream] = Field( + ..., description="Reference to the parent stream.", title="Parent Stream" ) parent_key: str = Field( ..., @@ -2659,9 +2657,6 @@ class ParentStreamConfig(BaseModel): examples=["id", "{{ config['parent_record_id'] }}"], title="Parent Key", ) - stream: Union[DeclarativeStream, StateDelegatingStream] = Field( - ..., description="Reference to the parent stream.", title="Parent Stream" - ) partition_field: str = Field( ..., description="While iterating over parent records during a sync, the parent_key value can be referenced by using this field.", @@ -2678,6 +2673,11 @@ class ParentStreamConfig(BaseModel): description="Indicates whether the parent stream should be read incrementally based on updates in the child stream.", title="Incremental Dependency", ) + lazy_read_pointer: Optional[List[str]] = Field( + [], + description="If set, this will enable lazy reading, using the initial read of parent records to extract child records.", + title="Lazy Read Pointer", + ) extra_fields: Optional[List[List[str]]] = Field( None, description="Array of field paths to include as additional fields in the stream slice. Each path is an array of strings representing keys to access fields in the respective parent record. Accessible via `stream_slice.extra_fields`. Missing fields are set to `None`.", @@ -2772,22 +2772,22 @@ class SimpleRetriever(BaseModel): ) partition_router: Optional[ Union[ - ListPartitionRouter, SubstreamPartitionRouter, + ListPartitionRouter, GroupingPartitionRouter, CustomPartitionRouter, List[ Union[ - ListPartitionRouter, SubstreamPartitionRouter, + ListPartitionRouter, GroupingPartitionRouter, CustomPartitionRouter, ] ], ] ] = Field( - [], - description="PartitionRouter component that describes how to partition the stream, enabling incremental syncs and checkpointing.", + None, + description="Used to iteratively execute requests over a set of values, such as a parent stream's records or a list of constant values.", title="Partition Router", ) parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")