Define the routes that determine where the data in your pipeline is routed.
YAML Init Parameters
These are the parameters you can pass to this component in the pipeline YAML configuration:
Parameter | Type | Possible values | Description |
---|---|---|---|
routes | List of dictionaries | A list of dictionaries, each defining a route. Each route dictionary contains the following key elements: - condition : A Jinja2 string expression that ConditionalRouter evaluates for being true. For example, "condition": "{{streams | length > 2}}" is true if the ByteStream length is greater than 2.- output : A Jinja2 expression defining the route's output value. The output is a dictionary where the key is output_name and the value is output .- output_name : The name you want to use to publish the output value. This is the key in the output dictionary. It's used to connect ConditionalRouter to other components in the pipeline.- output_type : The type of the output data, for example List[ByteStream] .Required. | |
custom_filters | Dictionary of string and callable | Default: None | A dictionary of custom Jinja2 filters to be used in the condition expressions. For example, a filter like {"my_filter": my_filter_fcn} , where:- my_filter is the name of the custom filter- my_filter_fcn is a callable that takes my_var:str and returns my_var[:3] {{ my_var|my_filter }} can be used inside a route condition expression, like this:"condition": "{{ my_var|my_filter == ``foo`` }}" Optional. |
REST API Runtime Parameters
There are no runtime parameters you can pass to this component when making a request to the Search REST API endpoint.