Data Services Events
DAPs and SM provide event callbacks that can be customized with user code. To use the callbacks, the custom code must be installed via a package.
Packaging and Installation
Refer to the User Defined Analytics (UDAs) documentation.
Process and lifecycle events
Syntax:
.ev.add[eventName;fnName]
The given function is called whenever the event is triggered. The parameters to the function are the event name and payload.
Example:
Code that could be added to sm.q
to use the initialization hooks in the SM.
.custom.sm.processInitPreCalled:0b;
.custom.sm.processInitPostCalled:0b;
.custom.sm.processInitPre:{[event;data]
.custom.sm.processInitPreCalled:1b;
}
.custom.sm.processInitPost:{[event;data]
.custom.sm.processInitPostCalled:1b;
}
.ev.add[`process.init.pre ;`.custom.sm.processInitPre];
.ev.add[`process.init.post;`.custom.sm.processInitPost];
Initialization
Event |
Component |
Description |
Payload |
---|---|---|---|
|
SM,AGG,RC,DAP |
Before process initialization |
N/A |
|
SM,AGG,RC,DAP |
After process initialization |
N/A |
|
DAP |
Before SG registration so that API's are available via |
N/A |
Data persistence
Event |
Component |
Description |
Payload |
---|---|---|---|
|
DAP |
End of partition (EOI/EOD) received from busDeprecates |
(dict) End of partition message details |
|
DAP |
Before reloading the DB |
(dict) Reload message details |
|
DAP |
After reloading the DBDeprecates |
(dict) Reload message details |
|
SM (EOI) |
Before EOI processing |
(dict) Contains |
|
SM (EOI) |
After EOI processing |
(dict) Contains |
|
SM (EOD) |
Before EOD processing |
(dict) Contains |
|
SM (EOD) |
After EOD processing |
(dict) Contains |
|
SM |
Before batch processing |
(dict) Contains |
|
SM |
After batch processing |
(dict) Contains |