wso2wso2-das

Howto override the event timestamp set by WSO2DAS


Currently WSO2 Data Analytic Server set the current timestamp to every event received using the available APIs. Is there a way to pass the timestamp value on the event data over the APIs in order to sent historical events to DAS?


Solution

  • From DAS 3.1.0 RC 1 onwards this can be achieved. You can follow the steps below to try it out.

    1. Download DAS 3.1.0 RC1 from here.
    2. Create an event stream with your payload and also add an attribute named _timestamp and set the attribute type as long.
    3. Persist the Event selecting your payload attributes. (Please note that you will not be able to select the _timestamp attribute so leave it as it is)
    4. Now simulate a event by providing your payload data along with the _timestamp epoch e.g - 1450206041000. The data explorer will show you an event received in 2015-12-16 00:30:41