Apama Analytics Builder 10.5.7 | Using Apama Analytics Builder for Cumulocity IoT | Model Simulation | Configuring an alternative data source for simulation
 
Configuring an alternative data source for simulation
By default, the platform database is used to retrieve the historical data for the simulation of an Apama Analytics Builder model. You can configure an alternative data source for simulation, for example, if historical data is maintained separately. The data source must support HTTP GET operations for the required path and query parameters. The response to the GET operation must conform to the standard JSON format of Cumulocity IoT. Refer to the Cumulocity IoT documentation for the data and query parameter formats.
If you want to use an alternative data source for simulation, you need to define the tenant options listed below. That is, you need to send 3 separate POST /tenant/options requests. For detailed information, see the information on tenants in the Reference guide at https://www.cumulocity.com/guides/.
*simulation.dataSource.url - The base HTTP URL of the data source.
*simulation.dataSource.username - The username to be used for the HTTP basic authentication.
*simulation.dataSource.password - The password to be used for the HTTP basic authentication.
For example:
{
"category": "analytics.builder",
"key": "simulation.dataSource.url",
"value": "http://192.168.1.1/"
}
{
"category": "analytics.builder",
"key": "simulation.dataSource.username",
"value": "myname"
}
{
"category": "analytics.builder",
"key": "simulation.dataSource.password",
"value": "secret"
}
See also Configuration.
The sections below list the path and query parameters that need to be supported by the alternative data source.
Alarms
Path: alarm/alarms
Query parameters:
*source - Source ManagedObject identifier of the alarms.
*dateFrom - Start date or date and time of the alarm occurrence.
*dateTo - End date or date and time of the alarm occurrence.
*pageSize - Maximum number of records to return.
*currentPage - The current returned page within the full result set, starting at page 1.
Events
Path: event/events
Query parameters:
*source - Source ManagedObject identifier of the events.
*dateFrom - Start date or date and time of the events.
*dateTo - End date or date and time of the events.
*pageSize - Maximum number of records to return.
*currentPage - The current returned page within the full result set, starting at page 1.
Measurements
Path: measurement/measurements
Query parameters:
*source - Source ManagedObject identifier of the measurements.
*dateFrom - Start date or date and time of the measurements.
*dateTo - End date or date and time of the measurements.
*pageSize - Maximum number of records to return.
*currentPage - The current returned page within the full result set, starting at page 1.
Operations
Path: devicecontrol/operations
Query parameters:
*deviceId - Source device identifier of the operations.
*createdFrom - Start creation time of the operations.
*createdTo - End creation time of the operations.
*pageSize - Maximum number of records to return.
*currentPage - The current returned page within the full result set, starting at page 1.