0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ウィンドウの種類の整理

Posted at

ホッピングウィンドウやその他のウィンドウ処理は、GCPのDataflow(Apache Beam)やAzure Stream Analytics、AWS Kinesis Data Analyticsなどのさまざまなストリーム処理基盤で広く使われています。

ウィンドウの種類の整理

ウィンドウ種別 特徴 向いている処理
ホッピングウィンドウ 一定間隔で重なり合う固定時間ウィンドウ 移動平均などの時間スライディング統計
セッションウィンドウ アクティビティの間隔に基づく ユーザーセッション解析など
タンブリングウィンドウ 固定長・重なりなし シンプルな集計、例:5分ごとの合計

サンプルコード(Python SDK)

# Hopping Window(5分幅・1分間隔)
beam.WindowInto(SlidingWindows(size=300, period=60))

# Tumbling Window(5分ごと)
beam.WindowInto(FixedWindows(300))

# Session Window(30秒のギャップ)
beam.WindowInto(Sessions(30))
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?