Skip to content

Conversation

MartijnVisser
Copy link
Contributor

@MartijnVisser MartijnVisser commented Sep 2, 2021

  • Added a new recipe for Window Top-N
  • Fixed a typo in the previous recipe

Copy link

@twalthr twalthr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tiny comment, otherwise looks good to me.

Btw can we rename the directory as well in a separate PR? Listing aggregations-and-analytics/ is not very nice when reading only 1, 2, 3, 4 etc.

The source table (`orders`) is backed by the [`faker` connector](https://flink-packages.org/packages/flink-faker), which continuously generates rows in memory based on Java Faker expressions.

In our previous recipes we've shown how you can [aggregate time series data](../01/01_group_by_window_tvf.md) using the `TUMBLE` function and also how you can get continuous [Top-N results](../05/05_top_n.md).
In this recipe, we'll use a combination of a tumbling window and the `Window Top-N` [feature](https://ci.apache.org/projects/flink/flink-docs-stable/docs/dev/table/sql/queries/window-topn/) to display the top 3 suppliers with the highest sales every 5 minutes.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: a combination of ... Window Top-N isn't this term already the combination?

Copy link
Contributor Author

@MartijnVisser MartijnVisser Sep 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, fixed

Copy link
Contributor

@infoverload infoverload left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just wanted to NIT and enforce more pronoun consistency (i.e. https://www.gatsbyjs.com/contributing/gatsby-style-guide/#use-you-as-the-pronoun)

@MartijnVisser MartijnVisser merged commit 7470a91 into ververica:main Sep 3, 2021
@MartijnVisser MartijnVisser deleted the window-top-n branch September 3, 2021 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants