Azure PostgreSQL Actions¶
Actions are the operations (or API operations) that you can perform on Azure PostgreSQL database application by simple drag-drop and data mapping of elements and values from input trigger, derived values using formulas or a desired constant that you may wish to map.
All of the actions that you see below automate what you can do manually on Azure PostgreSQL.
As shown in Figure 1, Connect iPaaS provides 4 actions for Azure PostgreSQL on response to a trigger event.
- Create Record
- Delete Record
- Update Record
- Upsert Record
Create Record¶
This action will create a record on response to the event trigger into a selected table.
Select the table from the database in which you have to create record. After the table selection all the Not Null
columns of your tables will be shown as required fields.
You can add optional fields of the table using the ADD (+) button. You can map fields data using trigger data or you can use Excel-style functions.
For example, as shown below Figure 2, values of Incident
table multiple columns are mapped to attributes from ServiceNow (Privileged).
Delete Record¶
This action will delete one or multiple Azure PostgreSQL database records on response to the event trigger. You can filter records based on the selection criteria.
Select the table in your database from which you want to delete the records.
Now you can add the conditions to select the records that will be deleted. You can construct complex logic of AND (+) and OR (OR) conditions to select the records.
For example, in Figure 3 below, from the table Incident
, all the records which have Incident_name same as the Category
of ServiceNow incident and Incident_state same as Incident State
will be deleted when an incident is updated in ServiceNow (Privileged).
Update Record¶
This action will update one or multiple Azure PostgreSQL database records in response to an event trigger. You can update the record from the table based on some filters.
Select the table in your database in which you want to update the records.
Now you can add the conditions to select the records that will be updated. You can construct complex logic of AND (+) and OR (OR) conditions to select the records.
Select the updates that you want to perform on the selected records. You can use Data Mapping and Transformation and Excel-style functions. You can also use the evaluate functionality to map values for enum type columns.
In the figure below, whenever an Incident is updated on ServiceNow (Privileged), a record is updated in the Azure PostgreSQL database if the record's Incident_description
and Incident_name
columns are Equal
to the attributes value from ServiceNow trigger event.
In the Time_of_incident
column, the current date and time can be added using the excel function Now()
.
Upsert Record¶
Upsert operation is the combination of Update and Create or insert operations. Connect iPaaS will find if a record with matching Primary Key is present in the table. If a record is found, the record will be updated with the data provided and if it is not found, Connect iPaaS will create a new record. The Primary key can either be a single column or a combination of columns.
In the figure below, whenever an Incident is updated on ServiceNow (Privileged), a record is updated or added in PostgreSQL database. The database table incident_name
and incident_description
column are mapped to attributes from ServiceNow. The time_of_incident
column is populated with the current time using the excel style function Now()
.