I'd like to use 2 window group in a chain in my program as below.
Table myTable = cTable
However, it throws error: SlidingGroupWindow('w2, 'start, 150.rows, 1.rows) is invalid: Sliding window expects a time attribute for grouping in a stream environment.
Is there any way to assign time attribute after the first groupBy (w1)?
Sorry, I forgot to CC the user mailing list in my reply.
2018-04-12 17:27 GMT+02:00 Fabian Hueske <[hidden email]>:
Thanks Fabian. I tried to use "rowtime" and Flink tells me below exception:
Exception in thread "main" org.apache.flink.table.api.ValidationException: SlidingGroupWindow('w2, 'end, 150.rows, 1.rows) is invalid: Event-time grouping windows on row intervals in a stream environment are currently not supported.
Then I tried to OverWindows, luckily it can serve my requirement as well. Now my table query is like below
It works and I can get what I want. However, the result is not ordered by the rowtime (here I use "end" as alias). Is this by default and any thing to get it ordered?
Below is the entire requirement,
Basically there's one raw stream (r1), and I group it first by time as w1 then by window count as w2. I'd like to compare the "price" field in every raw event with the same field in the most close preceding event in w2.
If condition meets, I'd like to use the price value and timestamp in that event to get one matching event from another raw stream (r2).
CEP sounds to be a good idea. But I need to refer to event in other stream (r2) in current pattern condition (r1). Is it possible to do this using CEP?
On Mon, Apr 16, 2018 at 4:01 PM, Fabian Hueske <[hidden email]> wrote:
This sounds like a windowed join between the raw stream and the aggregated stream.It might be possible to do the "lookup" in the second raw stream with another windowed join. If not, you can fall back to the DataStream API / ProcessFunction and implement the lookup logic as you need it.
2018-04-18 3:03 GMT+02:00 Ivan Wang <[hidden email]>:
|Free forum by Nabble||Edit this page|