-1

EPL is like this:

select cast(a.ReportTime,date,dateformat:'yyyy-MM-dd') as ReportTime, a.Source, aa.RequestNum, a.ServerTotal, a.ServerSucc, b.Total, b.Succ, NULL as DataChange_LastTime, c.Response from IntlTotalCountEvent.win:time_batch(2 min) as aa inner join A.win:time_batch(2 min) as a on aa.ReportTime=a.ReportTime and aa.Source=a.Source inner join B.win:time_batch(2 min) as b on a.ReportTime=b.ReportTime and a.Source=b.Source inner join C.win:time_batch(1 min 30 sec) as c on a.ReportTime=c.ReportTime and a.Source=c.Source Sometimes it works,but sometimes doesn't work,even Fields ReportTime and Source both use same datas.

zyxing
  • 11
  • 5
  • 1
    Be precise while posting a question. It seems haven't even tried framing the question. – codechefvaibhavkashyap May 05 '16 at 05:57
  • Sorry,this is my first time to post a question in stackoverflow.And my english is worst(often use translate),so read and write is a big problem for me.Forgive me~ – zyxing May 05 '16 at 06:29

1 Answers1

0

Batch windows start when an event arrives. Each batch window is therefore independent and un-aligned with respect to other batch windows. If you want to align the batch windows use a context "create context Every5Sec start @now end after 2 minutes" and "win:keepall" instead of "win:batch".

user650839
  • 2,594
  • 1
  • 13
  • 9