Skip to content

Commit 8394767

Browse files
authored
[Hold] Platform: Redis destination connector (#462)
1 parent 3342a87 commit 8394767

File tree

10 files changed

+131
-0
lines changed

10 files changed

+131
-0
lines changed

mint.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@
525525
"platform/destinations/postgresql",
526526
"platform/destinations/qdrant",
527527
"platform/destinations/s3",
528+
"platform/destinations/redis",
528529
"platform/destinations/weaviate"
529530
]
530531
},
@@ -576,6 +577,7 @@
576577
"platform/api/destinations/pinecone",
577578
"platform/api/destinations/postgresql",
578579
"platform/api/destinations/qdrant",
580+
"platform/api/destinations/redis",
579581
"platform/api/destinations/s3",
580582
"platform/api/destinations/weaviate"
581583
]

platform/api/destinations/overview.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ For the list of specific settings, see:
2929
- [Pinecone](/platform/api/destinations/pinecone) (`destination_type=pinecone`)
3030
- [PostgreSQL](/platform/api/destinations/postgresql) (`destination_type=postgres`)
3131
- [Qdrant](/platform/api/destinations/qdrant) (`destination_type=qdrant-cloud`)
32+
- [Redis](/platform/api/destinations/redis) (`destination_type=redis`)
3233
- [S3](/platform/api/destinations/s3) (`destination_type=s3`)
3334
- [Weaviate](/platform/api/destinations/weaviate) (`destination_type=weaviate`)
3435

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: Redis
3+
---
4+
5+
Send processed data from Unstructured to Redis.
6+
7+
The requirements are as follows.
8+
9+
import RedisPrerequisites from '/snippets/general-shared-text/redis.mdx';
10+
11+
<RedisPrerequisites />
12+
13+
To create or change a Redis destination connector, see the following examples.
14+
15+
import RedisAPIRESTCreate from '/snippets/destination_connectors/redis_rest_create.mdx';
16+
import RedisAPIRESTChange from '/snippets/destination_connectors/redis_rest_change.mdx';
17+
18+
<CodeGroup>
19+
<RedisAPIRESTCreate />
20+
<RedisAPIRESTChange />
21+
</CodeGroup>
22+
23+
Replace the preceding placeholders as follows:
24+
25+
import RedisAPIPlaceholders from '/snippets/general-shared-text/redis-api-placeholders.mdx';
26+
27+
<RedisAPIPlaceholders />
28+
29+
To change a connector, replace `<connector-id>` with the destination connector's unique ID.
30+
To get this ID, see [List destination connectors](/platform/api/overview#list-destination-connectors).

platform/connectors.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ If your source is not listed here, you might still be able to connect Unstructur
5151
- [Pinecone](/platform/destinations/pinecone)
5252
- [PostgreSQL](/platform/destinations/postgresql)
5353
- [Qdrant](/platform/destinations/qdrant)
54+
- [Redis](/platform/destinations/redis)
5455
- [S3](/platform/destinations/s3)
5556
- [Weaviate](/platform/destinations/weaviate)
5657

platform/destinations/overview.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ To create a destination connector:
3333
- [Pinecone](/platform/destinations/pinecone)
3434
- [PostgreSQL](/platform/destinations/postgresql)
3535
- [Qdrant](/platform/destinations/qdrant)
36+
- [Redis](/platform/destinations/redis)
3637
- [S3](/platform/destinations/s3)
3738
- [Weaviate](/platform/destinations/weaviate)
3839

platform/destinations/redis.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Redis
3+
---
4+
5+
Send processed data from Unstructured to Redis.
6+
7+
The requirements are as follows.
8+
9+
import RedisPrerequisites from '/snippets/general-shared-text/redis.mdx';
10+
11+
<RedisPrerequisites />
12+
13+
To create the destination connector:
14+
15+
1. On the sidebar, click **Connectors**.
16+
2. Click **Destinations**.
17+
3. Cick **New** or **Create Connector**.
18+
4. Give the connector some unique **Name**.
19+
5. In the **Provider** area, click **Redis**.
20+
6. Click **Continue**.
21+
7. Follow the on-screen instructions to fill in the fields as described later on this page.
22+
8. Click **Save and Test**.
23+
24+
import RedisFields from '/snippets/general-shared-text/redis-platform.mdx';
25+
26+
<RedisFields />
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
```bash REST (Change)
2+
curl --request 'PUT' --location \
3+
"$UNSTRUCTURED_API_URL/destinations/<connector-id>" \
4+
--header 'accept: application/json' \
5+
--header "unstructured-api-key: $UNSTRUCTURED_API_KEY" \
6+
--header 'content-type: application/json' \
7+
--data \
8+
'{
9+
"config": {
10+
"database": <database>,
11+
"ssl": <true|false>,
12+
"batch_size": <batch-size>,
13+
14+
# For URI authentication:
15+
"uri": "<uri>"
16+
17+
# For password authentication:
18+
"host": "<host>",
19+
"port": <port>,
20+
"username": "<username>",
21+
"password": "<password>"
22+
}
23+
}'
24+
```
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
```bash REST (Create)
2+
curl --request 'POST' --location \
3+
"$UNSTRUCTURED_API_URL/destinations" \
4+
--header 'accept: application/json' \
5+
--header "unstructured-api-key: $UNSTRUCTURED_API_KEY" \
6+
--header 'content-type: application/json' \
7+
--data \
8+
'{
9+
"name": "<name>",
10+
"type": "redis",
11+
"config": {
12+
"database": <database>,
13+
"ssl": <true|false>,
14+
"batch_size": <batch-size>,
15+
16+
# For URI authentication:
17+
"uri": "<uri>"
18+
19+
# For password authentication:
20+
"host": "<host>",
21+
"port": <port>,
22+
"username": "<username>",
23+
"password": "<password>"
24+
}
25+
}'
26+
```
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- `<name>` (required) - A unique name for this connector.
2+
- `<uri>` 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://`.
3+
- `<host>` (_required_ for password authentication): The target database's hostname.
4+
- `<port>`: For password authentication, the database's port number. The default is `6379` unless otherwise specified.
5+
- `<username>` (_required_ for password authentication): The name of the database user (not the logged in user).
6+
- `<password>` (_required_ for password authentication): The database user's password.
7+
- `<database>`: The number (index) for the target database. The default is `0` unless otherwise specified.
8+
- 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.
9+
- `<batch-size>`: The maximum number of records to upload in a single batch. The default is `100` unless otherwise specified.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Fill in the following fields:
2+
3+
- **Name** (_required_): A unique name for this connector.
4+
- **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://<username>:<password>@<hostname>:<port-number>`. If SSL encryption is enabled for the database, use `rediss://` instead of `redis://`.
5+
- **Host** (_required_ if **Password** is selected for **Authentication Method**): The target database's hostname.
6+
- **Port**: If **Password** is selected for **Authentication Method**, the database's port number. The default is `6379` unless otherwise specified.
7+
- **Username** (_required_ if **Password** is selected for **Authentication Method**): The name of the database user (not the logged in user).
8+
- **Password** (_required_ if **Password** is selected for **Authentication Method**): The database user's password.
9+
- **Database Index**: The number (index) for the target database. The default is `0` unless otherwise specified.
10+
- **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.
11+
- **Batch Size**: The maximum number of records to upload in a single batch. The default is `100` unless otherwise specified.

0 commit comments

Comments
 (0)