Sergei Sukhanov
05/23/2023, 8:25 PMkapa.ai
05/23/2023, 8:25 PMkapa.ai
05/23/2023, 8:27 PMparent_key
from the parent stream in the child stream by configuring a SubstreamPartitionRouter in the manifest.yaml file. This allows you to fetch records from the child stream based on the records of the parent stream. To do this, you need to configure the following fields in the SubstreamPartitionRouter: - Parent stream: The stream whose records should be used as partitions. - Parent key: The property on the parent stream record that should become the partition value (usually an ID). - Current partition value identifier: A freely chosen identifier for the variable holding the current partition value. You can use this in the path of the stream using the {{ stream_partition.<identifier> }}
interpolation placeholder. Here's an example of how to configure the SubstreamPartitionRouter in the manifest.yaml file: yaml # manifest.yaml stream_config: partition_router: type: SubstreamPartitionRouter parent_stream_configs: - parent_key: "id" stream: "#/definitions/ParentStream" partition_field: "parent_id" request_option: type: Path field: "parent_id"
In this example, the parent_key
is set to id
, and the partition_field
is set to parent_id
. The request_option
is configured to use the Path
type and the field
is set to parent_id
. This configuration will allow you to use the parent key value in the child stream's path URL. For more information on configuring SubstreamPartitionRouter, refer to the [Airbyte documentation on partitioning](https://docs.airbyte.com/connector-development/connector-builder-ui/partitioning). However, if the API does not provide the parent ID in the child stream's response, you might need to modify the connector's code to include the parent ID in the child stream's records before they are written to the destination. This would require custom development and is not directly supported by the low-code connector configuration.Sergei Sukhanov
05/23/2023, 8:51 PM