From b65e6495ea2acc6fed23386868a0457d65f5c3ff Mon Sep 17 00:00:00 2001 From: Paul Cornell Date: Thu, 30 Jan 2025 16:16:05 -0800 Subject: [PATCH 1/2] Platform: Redis destination connector --- mint.json | 2 ++ platform/api/destinations/overview.mdx | 1 + platform/api/destinations/redis.mdx | 30 +++++++++++++++++++ platform/connectors.mdx | 1 + platform/destinations/overview.mdx | 1 + platform/destinations/redis.mdx | 26 ++++++++++++++++ .../redis_rest_change.mdx | 13 ++++++++ .../redis_rest_create.mdx | 15 ++++++++++ .../redis-api-placeholders.mdx | 9 ++++++ .../general-shared-text/redis-platform.mdx | 11 +++++++ 10 files changed, 109 insertions(+) create mode 100644 platform/api/destinations/redis.mdx create mode 100644 platform/destinations/redis.mdx create mode 100644 snippets/destination_connectors/redis_rest_change.mdx create mode 100644 snippets/destination_connectors/redis_rest_create.mdx create mode 100644 snippets/general-shared-text/redis-api-placeholders.mdx create mode 100644 snippets/general-shared-text/redis-platform.mdx diff --git a/mint.json b/mint.json index 5b0ec122..07c9df25 100644 --- a/mint.json +++ b/mint.json @@ -518,6 +518,7 @@ "platform/destinations/postgresql", "platform/destinations/qdrant", "platform/destinations/s3", + "platform/destinations/redis", "platform/destinations/weaviate" ] }, @@ -569,6 +570,7 @@ "platform/api/destinations/pinecone", "platform/api/destinations/postgresql", "platform/api/destinations/qdrant", + "platform/api/destinations/redis", "platform/api/destinations/s3", "platform/api/destinations/weaviate" ] diff --git a/platform/api/destinations/overview.mdx b/platform/api/destinations/overview.mdx index 09029556..478ff16d 100644 --- a/platform/api/destinations/overview.mdx +++ b/platform/api/destinations/overview.mdx @@ -29,6 +29,7 @@ For the list of specific settings, see: - [Pinecone](/platform/api/destinations/pinecone) (`destination_type=pinecone`) - [PostgreSQL](/platform/api/destinations/postgresql) (`destination_type=postgres`) - [Qdrant](/platform/api/destinations/qdrant) (`destination_type=qdrant-cloud`) +- [Redis](/platform/api/destinations/redis) (`destination_type=redis`) - [S3](/platform/api/destinations/s3) (`destination_type=s3`) - [Weaviate](/platform/api/destinations/weaviate) (`destination_type=weaviate`) diff --git a/platform/api/destinations/redis.mdx b/platform/api/destinations/redis.mdx new file mode 100644 index 00000000..023d0bbf --- /dev/null +++ b/platform/api/destinations/redis.mdx @@ -0,0 +1,30 @@ +--- +title: Redis +--- + +Send processed data from Unstructured to Redis. + +The requirements are as follows. + +import RedisPrerequisites from '/snippets/general-shared-text/redis.mdx'; + + + +To create or change a Redis destination connector, see the following examples. + +import RedisAPIRESTCreate from '/snippets/destination_connectors/redis_rest_create.mdx'; +import RedisAPIRESTChange from '/snippets/destination_connectors/redis_rest_change.mdx'; + + + + + + +Replace the preceding placeholders as follows: + +import RedisAPIPlaceholders from '/snippets/general-shared-text/redis-api-placeholders.mdx'; + + + +To change a connector, replace `` with the source connector's unique ID. +To get this ID, see [List source connectors](/platform/api/overview#list-source-connectors). \ No newline at end of file diff --git a/platform/connectors.mdx b/platform/connectors.mdx index ea69495c..1a8bce25 100644 --- a/platform/connectors.mdx +++ b/platform/connectors.mdx @@ -51,6 +51,7 @@ If your source is not listed here, you might still be able to connect Unstructur - [Pinecone](/platform/destinations/pinecone) - [PostgreSQL](/platform/destinations/postgresql) - [Qdrant](/platform/destinations/qdrant) +- [Redis](/platform/destinations/redis) - [S3](/platform/destinations/s3) - [Weaviate](/platform/destinations/weaviate) diff --git a/platform/destinations/overview.mdx b/platform/destinations/overview.mdx index 58e0a37f..bf7ea3c1 100644 --- a/platform/destinations/overview.mdx +++ b/platform/destinations/overview.mdx @@ -33,6 +33,7 @@ To create a destination connector: - [Pinecone](/platform/destinations/pinecone) - [PostgreSQL](/platform/destinations/postgresql) - [Qdrant](/platform/destinations/qdrant) + - [Redis](/platform/destinations/redis) - [S3](/platform/destinations/s3) - [Weaviate](/platform/destinations/weaviate) diff --git a/platform/destinations/redis.mdx b/platform/destinations/redis.mdx new file mode 100644 index 00000000..595ee8ff --- /dev/null +++ b/platform/destinations/redis.mdx @@ -0,0 +1,26 @@ +--- +title: Redis +--- + +Send processed data from Unstructured to Redis. + +The requirements are as follows. + +import RedisPrerequisites from '/snippets/general-shared-text/redis.mdx'; + + + +To create the destination connector: + +1. On the sidebar, click **Connectors**. +2. Click **Destinations**. +3. Cick **New** or **Create Connector**. +4. Give the connector some unique **Name**. +5. In the **Provider** area, click **Redis**. +6. Click **Continue**. +7. Follow the on-screen instructions to fill in the fields as described later on this page. +8. Click **Save and Test**. + +import RedisFields from '/snippets/general-shared-text/redis-platform.mdx'; + + \ No newline at end of file diff --git a/snippets/destination_connectors/redis_rest_change.mdx b/snippets/destination_connectors/redis_rest_change.mdx new file mode 100644 index 00000000..342f0be0 --- /dev/null +++ b/snippets/destination_connectors/redis_rest_change.mdx @@ -0,0 +1,13 @@ +```bash REST (Change) +curl --request 'PUT' --location \ +"$UNSTRUCTURED_API_URL/destinations/" \ +--header 'accept: application/json' \ +--header "unstructured-api-key: $UNSTRUCTURED_API_KEY" \ +--header 'content-type: application/json' \ +--data \ +'{ + "config": { + ... + } +}' +``` \ No newline at end of file diff --git a/snippets/destination_connectors/redis_rest_create.mdx b/snippets/destination_connectors/redis_rest_create.mdx new file mode 100644 index 00000000..f4161a46 --- /dev/null +++ b/snippets/destination_connectors/redis_rest_create.mdx @@ -0,0 +1,15 @@ +```bash REST (Create) +curl --request 'POST' --location \ +"$UNSTRUCTURED_API_URL/destinations" \ +--header 'accept: application/json' \ +--header "unstructured-api-key: $UNSTRUCTURED_API_KEY" \ +--header 'content-type: application/json' \ +--data \ +'{ + "name": "", + "type": "redis", + "config": { + ... + } +}' +``` \ No newline at end of file diff --git a/snippets/general-shared-text/redis-api-placeholders.mdx b/snippets/general-shared-text/redis-api-placeholders.mdx new file mode 100644 index 00000000..542af316 --- /dev/null +++ b/snippets/general-shared-text/redis-api-placeholders.mdx @@ -0,0 +1,9 @@ +- `` (required) - A unique name for this connector. +- `` For URI authentication, the connection URI for the target database user and password, hostname, and port number. Use the format of `redis://:@:`. If SSL encryption is enabled for the database, use `rediss://` instead of `redis://`. +- `` (_required_ for password authentication): The target database's hostname. +- ``: For password authentication, the database's port number. The default is `6379` unless otherwise specified. +- `` (_required_ for password authentication): The name of the database user (not the logged in user). +- `` (_required_ for password authentication): The database user's password. +- ``: The number (index) for the target database. The default is `0` unless otherwise specified. +- ``: `true` to enable SSL encryption for the connection. Set to `true` only if SSL is already set up and enabled for the target database. The default is `true` unless otherwise specified. +- ``: The maximum number of records to upload in a single batch. The default is `100` unless otherwise specified. \ No newline at end of file diff --git a/snippets/general-shared-text/redis-platform.mdx b/snippets/general-shared-text/redis-platform.mdx new file mode 100644 index 00000000..231a256c --- /dev/null +++ b/snippets/general-shared-text/redis-platform.mdx @@ -0,0 +1,11 @@ +Fill in the following fields: + +- **Name** (_required_): A unique name for this connector. +- **URI**: If **URI** is selected for **Authentication Method**, the connection URI for the target database user and password, hostname, and port number. Use the format of `redis://:@:`. If SSL encryption is enabled for the database, use `rediss://` instead of `redis://`. +- **Host** (_required_ if **Password** is selected for **Authentication Method**): The target database's hostname. +- **Port**: If **Password** is selected for **Authentication Method**, the database's port number. The default is `6379` unless otherwise specified. +- **Username** (_required_ if **Password** is selected for **Authentication Method**): The name of the database user (not the logged in user). +- **Password** (_required_ if **Password** is selected for **Authentication Method**): The database user's password. +- **Database Index**: The number (index) for the target database. The default is `0` unless otherwise specified. +- **SSL**: Check this box to enable SSL encryption for the connection. Check this box only if SSL is already set up and enabled for the target database. This box is checked by default. +- **Batch Size**: The maximum number of records to upload in a single batch. The default is `100` unless otherwise specified. \ No newline at end of file From eff547536d4d4d4e747c379dc65d176a627b00d0 Mon Sep 17 00:00:00 2001 From: Paul Cornell Date: Fri, 31 Jan 2025 12:11:51 -0800 Subject: [PATCH 2/2] Added request payloads for Platform API for Redis --- platform/api/destinations/redis.mdx | 4 ++-- .../destination_connectors/redis_rest_change.mdx | 13 ++++++++++++- .../destination_connectors/redis_rest_create.mdx | 13 ++++++++++++- .../general-shared-text/redis-api-placeholders.mdx | 4 ++-- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/platform/api/destinations/redis.mdx b/platform/api/destinations/redis.mdx index 023d0bbf..ef64d3dd 100644 --- a/platform/api/destinations/redis.mdx +++ b/platform/api/destinations/redis.mdx @@ -26,5 +26,5 @@ import RedisAPIPlaceholders from '/snippets/general-shared-text/redis-api-placeh -To change a connector, replace `` with the source connector's unique ID. -To get this ID, see [List source connectors](/platform/api/overview#list-source-connectors). \ No newline at end of file +To change a connector, replace `` with the destination connector's unique ID. +To get this ID, see [List destination connectors](/platform/api/overview#list-destination-connectors). \ No newline at end of file diff --git a/snippets/destination_connectors/redis_rest_change.mdx b/snippets/destination_connectors/redis_rest_change.mdx index 342f0be0..8ff9f2bb 100644 --- a/snippets/destination_connectors/redis_rest_change.mdx +++ b/snippets/destination_connectors/redis_rest_change.mdx @@ -7,7 +7,18 @@ curl --request 'PUT' --location \ --data \ '{ "config": { - ... + "database": , + "ssl": , + "batch_size": , + + # For URI authentication: + "uri": "" + + # For password authentication: + "host": "", + "port": , + "username": "", + "password": "" } }' ``` \ No newline at end of file diff --git a/snippets/destination_connectors/redis_rest_create.mdx b/snippets/destination_connectors/redis_rest_create.mdx index f4161a46..fa776437 100644 --- a/snippets/destination_connectors/redis_rest_create.mdx +++ b/snippets/destination_connectors/redis_rest_create.mdx @@ -9,7 +9,18 @@ curl --request 'POST' --location \ "name": "", "type": "redis", "config": { - ... + "database": , + "ssl": , + "batch_size": , + + # For URI authentication: + "uri": "" + + # For password authentication: + "host": "", + "port": , + "username": "", + "password": "" } }' ``` \ No newline at end of file diff --git a/snippets/general-shared-text/redis-api-placeholders.mdx b/snippets/general-shared-text/redis-api-placeholders.mdx index 542af316..ce042f43 100644 --- a/snippets/general-shared-text/redis-api-placeholders.mdx +++ b/snippets/general-shared-text/redis-api-placeholders.mdx @@ -4,6 +4,6 @@ - ``: For password authentication, the database's port number. The default is `6379` unless otherwise specified. - `` (_required_ for password authentication): The name of the database user (not the logged in user). - `` (_required_ for password authentication): The database user's password. -- ``: The number (index) for the target database. The default is `0` unless otherwise specified. -- ``: `true` to enable SSL encryption for the connection. Set to `true` only if SSL is already set up and enabled for the target database. The default is `true` unless otherwise specified. +- ``: The number (index) for the target database. The default is `0` unless otherwise specified. +- For `ssl`, `true` to enable SSL encryption for the connection. Set to `true` only if SSL is already set up and enabled for the target database. The default is `true` unless otherwise specified. - ``: The maximum number of records to upload in a single batch. The default is `100` unless otherwise specified. \ No newline at end of file