0

I put data into Esper with a type:

{"symbol" :string
 "price"  :double}

I want to have a symbol of a min price from every minute. When I do something like that:

select min(price), symbol 
from Market.win:time_batch(60 sec)

I get a lot of events with the same price (min price), but different symbols (and I want to have only one event (per minute) with only one symbol and price).

jadb
  • 1

1 Answers1

0

Its similar in behavior to an SQL query and provides the symbol for each row and the batch minimum. Just like in SQL you can use "group by" to control on what level the aggregation operates.

select min(price), symbol from Market.win:time_batch(60 sec) group by symbol

By the way, the batch window retains events in memory. There is an "output snapshot" so that there is no need for the batch window.

user3613754
  • 816
  • 1
  • 5
  • 5