Generic Postgres Executor
Overview#
The Generic Postgres Executor allows you to connect to a PostgreSQL relational database.
How to use the Generic Postgres Executor#
To use the Generic Postgres Executor, pass an object with the parameters you require, from the schema table listed below. Also refer to the code sample listed below.
Generic Postgres Executor schema#
| Property | Type | Description | Required |
|---|---|---|---|
_orchcomp | String | Enter “pg_executor”. | Required |
_name | String | Enter a descriptive name for what the component does in the orchestrator. | Optional |
_sequenceno | Integer | Enter a number that defines the task’s order in the sequence of tasks to execute. | Required |
_actualparams | Object | Pass an object that contains formal parameters or alternative parameters you want to add as key-value pairs, such as “userType”: “<your-user-type>”. | Optional |
_actualparams.stmt | String | Takes a SQL statement as a string. | Optional |
_actualparams.optype | String | Takes the operation type, such as INSERT, UPDATE, DELETE, or SELECT, as a string. | Optional |
_actualparams.uname | String | Takes the database username as a string. | Optional |
_actualparams.pwd | String | Takes the database password as a string. | Optional |
Code example#
Refer to the code sample below.
…{ "_orchcomp": "pg_executor", "_name": "Connects to the PostgreSQL relational database", "_sequenceno": 1, "_actualparams": { "stmt": "<your-SQL-statement>", "optype": "SELECT", "uname": "johnDoe", "pwd": "secret" }}, …