Sergii Mikhtoniuk is questioning the reason behind the limitation of emit on window close
for tumble + group by
statements to materialized views and expressing the desire to use it for stream-in + stream-out without materialized views. tianshuo shi suggests creating a sink directly with emit on window close
as an alternative solution.
Sergii Mikhtoniuk
Asked on Apr 08, 2024
emit on window close
for tumble + group by
statements is currently only supported for materialized views because it involves maintaining state across windows, which is more efficiently handled with materialized views.
However, as tianshuo shi pointed out, you can create a sink directly with emit on window close
as an alternative solution for stream-in + stream-out scenarios without materialized views.
This approach allows you to achieve the desired behavior of emitting results when a window closes without the need for materialized views.
CREATE SINK my_sink
EMIT on window close
AS
SELECT ...