Notifications - SQL

Overview

Used to create, update, delete and browse through outgoing SQL notifications.

A notification is an SQL query invoked periodically which upon its execution runs asynchronously a user-defined service providing the service with all the rows fetched by the query, if any, under a ‘data’ key of the input dictionary in self.request.raw_request. The service will be invoked with empty input if the database doesn’t return anything in a given iteration.

All datetime.datetime objects return by the database will be converted to ISO 8601 format before handing the results over to the user’s service.

../../_images/sql.png

Create and Edit

../../_images/sql-create.png
Header Notes
Name Definition’s name
Active Whether any data will be fetched from the underlying database or not
Connection An outgoing SQL connection to use for connecting to the database
Interval In seconds. How often to fetch new data. Also, how often to check for changes to the notification’s configuration - it will take up to interval seconds for changes to take any effect.
Service Name of the service to invoke. All the rows will be in a list in self.request.raw_request.
Query The SQL query to run

Delete

../../_images/sql-delete.png

Stops and deletes a notification’s definition.

Changelog

Version Notes
2.0 Added initially