# Apache Flink Tumbling Window Aggregation

> Performs low-latency stateful stream aggregations with event-time watermarking using Apache Flink. Use when calculating sliding or tumbling window metrics over

- Skill: `bishnucd/apache-flink-tumbling-window-aggregation` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add bishnucd/apache-flink-tumbling-window-aggregation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bishnucd/apache-flink-tumbling-window-aggregation/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Coding & Dev Tools
- Author: Bishnucd (https://skillmd.com/u/bishnucd)
- Updated: 2026-12-02
- Page: https://skillmd.com/skills/bishnucd/apache-flink-tumbling-window-aggregation

---

---
name: apache-flink-tumbling-window-aggregation
description: Performs low-latency stateful stream aggregations with event-time watermarking using Apache Flink. Use when calculating sliding or tumbling window metrics over real-time telemetry.
license: MIT
metadata:
  author: Community List Maintainers
  version: "1.0.0"
  source: "https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/datastream/operators/windows/"
---
# Apache Flink Tumbling Window Aggregation

## Overview
Apache Flink provides true streaming computation with exactly-once state consistency, handling out-of-order event arrivals through watermarks and tumbling/sliding time windows.

## Operational Workflow

1. **Initialize StreamExecutionEnvironment and configure event-time characteristic.**:
   - Initialize StreamExecutionEnvironment and configure event-time characteristic.

2. **Assign BoundedOutOfOrdernessWatermarks to handle delayed network sensor packets.**:
   - Assign BoundedOutOfOrdernessWatermarks to handle delayed network sensor packets.

3. **Apply keyBy partitioning and window(TumblingEventTimeWindows.of(Time.minutes(5))).**:
   - Apply keyBy partitioning and window(TumblingEventTimeWindows.of(Time.minutes(5))).

4. **Compute window aggregations (sum, count, average) and sink results to real-time database.**:
   - Compute window aggregations (sum, count, average) and sink results to real-time database.

## Recommended Tools & Environments
- Apache Flink
- Java / Python (PyFlink)
- Stream Processing
- Event Time

## Verification & Execution Criteria
- Pre-execution validation verifies all prerequisites and inputs.
- Step-by-step progress logging confirms intermediate state transitions.
- Post-execution checks verify output integrity and clean exit codes.

