Skip to main content
Version: v5.1

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#

PropertyTypeDescriptionRequired
_orchcompStringEnter “pg_executor”.Required
_nameStringEnter a descriptive name for what the component does in the orchestrator.Optional
_sequencenoIntegerEnter a number that defines the task’s order in the sequence of tasks to execute.Required
_actualparamsObjectPass 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.stmtStringTakes a SQL statement as a string.Optional
_actualparams.optypeStringTakes the operation type, such as INSERT, UPDATE, DELETE, or SELECT, as a string.Optional
_actualparams.unameStringTakes the database username as a string.Optional
_actualparams.pwdStringTakes 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"  }},