Github user mbalassi commented on a diff in the pull request:
https://github.com/apache/flink/pull/395#discussion_r24737233
--- Diff: docs/streaming_guide.md ---
@@ -383,9 +389,40 @@
dataStream.groupBy(groupingField).window(Count.of(100)).every(â¦).max(field);
This will create separate windows for different keys and apply the trigger
and eviction policies on a per group basis.
+#### Applying multiple transformations on a window
+Using the `WindowedDataStream` abstraction we can apply several
transformations one after another on the discretised streams without having to
re-discretise it:
+
+~~~java
+dataStream.window(Count.of(1000)).groupBy(firstKey).mapWindow(â¦).groupBy(secondKey).reduceWindow(â¦).flatten()
+~~~
+
+The above call would create global windows of 1000 elements group it by
the first key and then apply a mapWindow transformation. The resulting windowed
stream will then be grouped by the second key and further reduced. The results
of the reduce transformation are then flattened.
--- End diff --
Nice example.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---