2016-10-07 1 views
0

Esper EPL Online console을 사용하려고하는데 시간 및 이벤트 시퀀스에서 날짜를 사용하는 방법을 모르겠습니다. 이 같은 예를 들어,Esper EPL 온라인 날짜 형식

create schema EventCreated(
    source String, 
    type String, 
    time Date 
); 

내가 시간과 이벤트 순서에서 이벤트를 추가하려고 해요 : 예를 들어, 내가 스키마는 다음과 같이 정의

EventCreated = { 
    source = 'tracker1', 
    type = 'c8y_ObdConnectionReport', 
    time = '2016-10-07T10:00:00.000' 
} 

그러나 물론이 작동하지 않습니다. "new Date()"또는 [com.espertech.esper.client.util.]DateTime.parseDefaultDate()을 사용해 보았지만 제대로 작동하지 않습니다.

답변

0

EPL 표현식을 평가하기위한 "평가판"이 있습니다.

StockTick={time=eval('com.espertech.esper.client.util.DateTime.parseDefaultDate("2016-10-07T10:00:00.000")')} 

도구가 문자열을 가져 와서 날짜를 지정하면 좋을 것입니다.