Skip to content

Commit 427aa13

Browse files
authored
Platform: PostgreSQL destination connector (#380)
1 parent 83628b2 commit 427aa13

File tree

15 files changed

+201
-59
lines changed

15 files changed

+201
-59
lines changed

mint.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,6 @@
472472
"platform/sources/overview",
473473
"platform/sources/azure-blob-storage",
474474
"platform/sources/confluence",
475-
"platform/sources/couchbase",
476475
"platform/sources/databricks-volumes",
477476
"platform/sources/dropbox",
478477
"platform/sources/elasticsearch",
@@ -501,6 +500,7 @@
501500
"platform/destinations/mongodb",
502501
"platform/destinations/onedrive",
503502
"platform/destinations/pinecone",
503+
"platform/destinations/postgresql",
504504
"platform/destinations/qdrant",
505505
"platform/destinations/s3",
506506
"platform/destinations/weaviate"
@@ -518,7 +518,6 @@
518518
"platform/api/sources/overview",
519519
"platform/api/sources/azure-blob-storage",
520520
"platform/api/sources/confluence",
521-
"platform/api/sources/couchbase",
522521
"platform/api/sources/databricks-volumes",
523522
"platform/api/sources/dropbox",
524523
"platform/api/sources/elasticsearch",

platform/api/sources/overview.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ To create a source connector, you must also provide a request body that contains
1414
For the list of specific settings, see:
1515

1616
- [Azure](/platform/api/sources/azure-blob-storage) (`source_type=azure`)
17-
- [Couchbase](/platform/api/sources/couchbase) (`source_type=couchbase`)
1817
- [Confluence](/platform/api/sources/confluence) (`source_type=confluence`)
1918
- [Databricks Volumes](/platform/api/sources/databricks-volumes) (`source_type=databricks_volumes`)
2019
- [Dropbox](/platform/api/sources/dropbox) (`source_type=dropbox`)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: PostgreSQL
3+
---
4+
5+
Ingest your files into Unstructured from PostgreSQL.
6+
7+
The requirements are as follows.
8+
9+
import PostgreSQLPrerequisites from '/snippets/general-shared-text/postgresql.mdx';
10+
11+
<PostgreSQLPrerequisites />
12+
13+
To create or change an PostgreSQL source connector, see the following examples.
14+
15+
import PostgreSQLAPIRESTCreate from '/snippets/source_connectors/postgresql_rest_create.mdx';
16+
import PostgreSQLAPIRESTChange from '/snippets/source_connectors/postgresql_rest_change.mdx';
17+
18+
<CodeGroup>
19+
<PostgreSQLAPIRESTCreate />
20+
<PostgreSQLAPIRESTChange />
21+
</CodeGroup>
22+
23+
Replace the preceding placeholders as follows:
24+
25+
import PostgreSQLAPIPlaceholders from '/snippets/general-shared-text/postgresql-api-placeholders.mdx';
26+
27+
<PostgreSQLAPIPlaceholders />
28+
29+
To change a connector, replace `<connector-id>` with the source connector's unique ID.
30+
To get this ID, see [List source connectors](/platform/api/overview#list-source-connectors).

platform/connectors.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ The Unstructured Platform supports connecting to the following source and destin
1313

1414
- [Azure](/platform/sources/azure-blob-storage)
1515
- [Confluence](/platform/sources/confluence)
16-
- [Couchbase](/platform/sources/couchbase)
1716
- [Databricks Volumes](/platform/sources/databricks-volumes)
1817
- [Dropbox](/platform/sources/dropbox)
1918
- [Elasticsearch](/platform/sources/elasticsearch)
@@ -44,6 +43,7 @@ If your source is not listed here, you might still be able to connect Unstructur
4443
- [MongoDB](/platform/destinations/mongodb)
4544
- [OneDrive](/platform/destinations/onedrive)
4645
- [Pinecone](/platform/destinations/pinecone)
46+
- [PostgreSQL](/platform/destinations/postgresql)
4747
- [Qdrant](/platform/destinations/qdrant)
4848
- [S3](/platform/destinations/s3)
4949
- [Weaviate](/platform/destinations/weaviate)

platform/destinations/overview.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ To create a destination connector:
2828
- [MongoDB](/platform/destinations/mongodb)
2929
- [OneDrive](/platform/destinations/onedrive)
3030
- [Pinecone](/platform/destinations/pinecone)
31+
- [PostgreSQL](/platform/destinations/postgresql)
3132
- [Qdrant](/platform/destinations/qdrant)
3233
- [S3](/platform/destinations/s3)
3334
- [Weaviate](/platform/destinations/weaviate)
Lines changed: 22 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,26 @@
11
---
22
title: PostgreSQL
3-
description: This page contains the information to store processed data to a PostgreSQL database.
43
---
54

6-
## Prerequisites
7-
8-
* PostgreSQL Server Hostname
9-
10-
* Database Name and Port Number
11-
12-
* Username and Password for Database Access
13-
14-
15-
For more information, please refer to [PostgreSQL documentation](https://www.postgresql.org/docs/).
16-
17-
<Warning>
18-
19-
Ensure that the index schema is compatible with the data you intend to write. If you need guidance on structuring your schema, consult the [Sample Index Schema](/open-source/ingest/destination-connectors/sql#sample-index-schema) for reference.
20-
</Warning>
21-
22-
## Step-by-Step Guide
23-
24-
![Destination Connector PostgreSQL](/img/platform/Destination-PostgreSQL.png)
25-
26-
1. **Access the Create Destination Page**. Navigate to the “Destinations” section within the platform’s side navigation menu and click on “New Destination” to initiate the setup of a new destination for your processed data.
27-
28-
2. **Select Destination Type**. Select **PostgreSQL** destination connector from the `Type` dropdown menu.
29-
30-
3. **Configure Destination Details**
31-
32-
<Note>
33-
* `Name` (_required_): Assign a descriptive name to the new destination connector.
34-
35-
* `Host` (_required_): Enter the hostname or IP address of the PostgreSQL server.
36-
37-
* `Database` (_required_): Provide the name of the PostgreSQL database.
38-
39-
* `Port`: Specify the port number for the PostgreSQL server (default is 5432).
40-
41-
* `Username`: Input the username for the PostgreSQL database access.
42-
43-
* `Password`: Enter the password associated with the username.
44-
</Note>
45-
46-
4. **Submit**. Review all the details entered to ensure accuracy. Click ‘Submit’ to finalize the creation of the Destination Connector. The newly completed PostgreSQL connector will be listed on the Destinations dashboard.
5+
Send processed data from Unstructured to PostgreSQL.
6+
7+
The requirements are as follows.
8+
9+
import PostgreSQLPrerequisites from '/snippets/general-shared-text/postgresql.mdx';
10+
11+
<PostgreSQLPrerequisites />
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 **PostgreSQL**.
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 PostgreSQLFields from '/snippets/general-shared-text/postgresql-platform.mdx';
25+
26+
<PostgreSQLFields />

platform/sources/overview.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ To create a source connector:
2020

2121
- [Azure](/platform/sources/azure-blob-storage)
2222
- [Confluence](/platform/sources/confluence)
23-
- [Couchbase](/platform/sources/couchbase)
2423
- [Databricks Volumes](/platform/sources/databricks-volumes)
2524
- [Dropbox](/platform/sources/dropbox)
2625
- [Elasticsearch](/platform/sources/elasticsearch)

platform/sources/postgresql.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: PostgreSQL
3+
---
4+
5+
Ingest your files into Unstructured from PostgreSQL.
6+
7+
The requirements are as follows.
8+
9+
import PostgreSQLPrerequisites from '/snippets/general-shared-text/postgresql.mdx';
10+
11+
<PostgreSQLPrerequisites />
12+
13+
To create the source connector:
14+
15+
1. On the sidebar, click **Connectors**.
16+
2. Click **Sources**.
17+
3. Cick **New** or **Create Connector**.
18+
4. Give the connector some unique **Name**.
19+
5. In the **Provider** area, click **PostgreSQL**.
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 PostgreSQLFields from '/snippets/general-shared-text/postgresql-platform.mdx';
25+
26+
<PostgreSQLFields />

snippets/destination_connectors/postgresql_rest_change.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ curl --request 'PUT' --location \
1313
"username": "<username>",
1414
"password": "<password>",
1515
"table_name": "<table-name>",
16-
"batch_size": "<batch-size>"
16+
"batch_size": <batch-size>
1717
}
1818
}'
1919
```

snippets/destination_connectors/postgresql_rest_create.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ curl --request 'POST' --location \
1515
"username": "<username>",
1616
"password": "<password>",
1717
"table_name": "<table-name>",
18-
"batch_size": "<batch-size>"
18+
"batch_size": <batch-size>
1919
}
2020
}'
2121
```

0 commit comments

Comments
 (0)