简体   繁体   English

如何覆盖由WSO2DAS设置的事件时间戳记

[英]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. 当前,WSO2 Data Analytic Server使用可用的API为收到的每个事件设置当前时间戳。 Is there a way to pass the timestamp value on the event data over the APIs in order to sent historical events to DAS? 是否可以通过API传递事件数据上的时间戳值,以便将历史事件发送到DAS?

From DAS 3.1.0 RC 1 onwards this can be achieved. 从DAS 3.1.0 RC 1开始,可以实现此目的。 You can follow the steps below to try it out. 您可以按照以下步骤进行尝试。

  1. Download DAS 3.1.0 RC1 from here . 此处下载DAS 3.1.0 RC1。
  2. Create an event stream with your payload and also add an attribute named _timestamp and set the attribute type as long . 使用有效负载创建事件流,并添加名为_timestamp的属性并将属性类型设置为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) (请注意,您将无法选择_timestamp属性,因此请保持原样)
  4. Now simulate a event by providing your payload data along with the _timestamp epoch eg - 1450206041000. The data explorer will show you an event received in 2015-12-16 00:30:41 现在,通过提供有效载荷数据以及_timestamp纪元(例如1450206041000)来模拟事件。数据浏览器将向您显示2015年12月16日00:30:41收到的事件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM