Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.unstructured.io/llms.txt

Use this file to discover all available pages before exploring further.

First time creating a connector? Read this first.
Send processed data from Unstructured to Redis.

Requirements

You will need:

Examples

To create a Redis destination connector, see the following examples. For more information on working with destination connectors using the Unstructured API, see Destination endpoints.
import os

from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import CreateDestinationRequest
from unstructured_client.models.shared import CreateDestinationConnector

with UnstructuredClient(api_key_auth=os.getenv("UNSTRUCTURED_API_KEY")) as client:
    response = client.destinations.create_destination(
        request=CreateDestinationRequest(
            create_destination_connector=CreateDestinationConnector(
                name="<name>",
                type="redis",
                config={
                    "database": "<database>",
                    "ssl": <True|False>,
                    "batch_size": <batch-size>,
                    "key_prefix": "<key-prefix>",

                    # For URI authentication, include only "uri" key:
                    # "uri": "<uri>",

                    # For password authentication, include these keys instead:
                    # "host": "<host>",
                    # "port": <port>,
                    # "username": "<username>",
                    # "password": "<password>"
                }
            )
        )
    )

    print(response.destination_connector_information)

Configuration settings

Replace the preceding placeholders as follows:
name
string
required
A unique name for this connector.
uri
string
For URI authentication, the connection URI for the target database user and password, hostname, and port number. Use the format of redis://<username>:<password>@<hostname>:<port-number>. If SSL encryption is enabled for the database, use rediss:// instead of redis://.
host
string
The target database’s hostname. Required for password authentication.
port
integer
default:"6379"
For password authentication, the database’s port number.
username
string
The name of the database user (not the logged in user). Required for password authentication.
password
string
The database user’s password. Required for password authentication.
database
integer
default:"0"
The number (index) for the target database.
key_prefix
string
default:"\"\""
A string to prepend to each element’s element_id. This is useful for distinguishing between different data sets in the same Redis instance.
batch_size
integer
default:"100"
The maximum number of records to upload in a single batch.
ssl
boolean
default:"true"
Set to true to enable SSL encryption for the connection. Set to true only if SSL is already set up and enabled for the target database.

Learn more