Apache flink tumbling window or any window always ...
# troubleshooting
a
Apache flink tumbling window or any window always applying grouping and subgrouping as part of aggregation, but i have a situation to collect data in a tumbling window without grouping or aggregation in flink sql client. Is this possible in apache flink?
m
always applying grouping and subgrouping as part of aggregation,
That's not the case. You can have individual results with Window TVF functions. Something like
Copy code
SELECT * FROM TABLE(
   TUMBLE(TABLE Bid, DESCRIPTOR(bidtime), INTERVAL '10' MINUTES));
Would produce individual results plus the window. See https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/sql/queries/window-tvf/ for more details
a
Thank you @Martijn Visser..This helps...Will this support for apache-flink version 1.13 ?
n
Yes
a
Could i use udf function for
Copy code
SELECT * FROM TABLE(
   TUMBLE(TABLE Bid, DESCRIPTOR(bidtime), INTERVAL '10' MINUTES));
without groupby?
a
Are you using Java or Python? AFAIK, you can in either case, but details differ.
I find the Python UDF API clunky.
The python udfs for groupby aggregation require that they store the calculated state in a data type that Flink knows. They also need functionality to remove values from the calculated aggregate. Neither of these are possible for an algorithm like the t-digest.
a
Thanks for the input..Is their any method to create a custom function to update record values in a tumbling window?
a
It's documented in the docs.
a
@Martijn Visser Thanks again...Your input solved my problems