PostgreSQL Integration with Orkes Conductor
Available since
- v5.3.0 and later
Connected Apps must be enabled on your cluster
Connected Apps are enabled per cluster. If Integrations > Connected Apps is not in the left navigation, contact Orkes support to enable it before following these steps.
Integrating PostgreSQL with Orkes Conductor lets you build workflows that interact with the PostgreSQL database using the following operations:
- Create Table
- Delete Table
- Insert Rows
- Update Rows
- Upsert Rows
- Select Rows
- Delete Rows
- Execute SQL
This guide explains how to set up and use the integration. Here's an overview:
- Get the required credentials from PostgreSQL.
- Configure a new PostgreSQL integration in Orkes Conductor.
- Use PostgreSQL integration in workflows.
Step 1: Get the PostgreSQL credentials
Note
You can use this integration in either of the following scenarios: - Conductor is running locally, and PostgreSQL server is running locally. - Conductor is running in the cloud, and the PostgreSQL server is exposed via a secure tunnel or hosted on a cloud database service.
To integrate PostgreSQL with Orkes Conductor, get the following credentials from your PostgreSQL server:
- Host
- Port
- Database name
- User
- Password
Step 2: Add an integration for PostgreSQL
After obtaining the credentials, add a PostgreSQL integration to your Conductor cluster.
To create an integration:
- Go to Integrations > Connected Apps from the left navigation menu on your Conductor cluster.
- Select + New integration.
- In the Database section, choose PostgreSQL.
- Select + Add and enter the following parameters:
| Parameter | Description | Required/Optional |
|---|---|---|
| Integration name | A name for the integration. | Required. |
| Host | The PostgreSQL server hostname or IP address. | Required. |
| Port | The PostgreSQL server port. Default is 5432. | Required. |
| Database | The name of the database to connect to. | Required. |
| User | The PostgreSQL username. | Required. |
| Password | The password for the PostgreSQL user. | Required. |
| SSL Enabled | Whether to enable SSL/TLS for the connection. Set to true or false. Default is false. |
Required. |
| Description | A description of the integration. | Required. |
- (Optional) Toggle the Active button off if you don't want to activate the integration instantly.
- Select Save.
Step 3: Use PostgreSQL integration in workflows
Once the integration is ready, this can be used directly within the workflows.
To use PostgreSQL integration in a workflow:
- Go to Definitions > Workflow from the left navigation menu on your Conductor cluster.
- Select + Define workflow.
- In your workflow, select the (+) icon and select Connected Apps.
- In Add Task panel on the right, search for PostgreSQL, and select the integration created in Step 2.
The following operations are available for use with this integration.
| Operation | Description |
|---|---|
| Create Table | Creates a new table in the database. |
| Delete Table | Deletes an existing table from the database. |
| Insert Rows | Inserts one or more rows into a table. |
| Update Rows | Updates existing rows in a table. |
| Upsert Rows | Inserts rows or updates them if they already exist. |
| Select Rows | Retrieves rows from a table based on specified conditions. |
| Delete Rows | Deletes rows from a table based on specified conditions. |
| Execute SQL | Executes a raw SQL query against the database. |
- Select the required operation, configure the parameters, and select Save > Confirm.
- Select Execute to run the workflow.
For the complete operations parameters and output reference, see PostgreSQL Operations Reference.