Enable Events for Resources in Oracle DB

Cloud Elements supports events via polling or webhooks depending on the API provider. For more information about our Events framework, see Events Overview.

You can enable polling for tableNames using the Oracle DB element on the UI. 

Note: Events for DB based elements depend on the DateTime format used in the Database. In order to make events work for DB elements, users need to update date format in the event.poller.configuration to match with the date format used in the database.

Database elements do not have event.poller.configuration enabled for all of their resources by default. Instead, you can customize the template to configure the event according to your needs. 

You can add the event.poller.configuration on the instance creation page. 

  1. Toggle the button under Events Configuration to enable events. 
  2. Edit the JSON under Configure Polling by clicking on the 'Edit' button to the right.
  3. The template JSON is available by default, as shown below.
  4. You can customize the template to reflect the correct DateTime format, as shown below.

Customized Template

{
  "tableName": {
    "url": "/hubs/db/tableName?where=updatedColumnName >= `to_timestamp('${gmtDate:yyyy-MM-dd HH:mm:ss}','YYYY-MM-DD HH24:MI:SS')`",
    "idField": "idFieldName"
    "datesConfiguration": {
      "updatedDateField": "updatedColumnName",
      "updatedDateFormat": "yyyy-MM-dd'T'HH:mm:ss",
      "updatedDateTimezone": "GMT",
      "createdDateField": "createdColumnName",
      "createdDateFormat": "yyyy-MM-dd'T'HH:mm:ss",
      "createdDateTimezone": "GMT"
    }
  }
}

You have now enabled events for the Oracle DB element.