56. • イベント別の集計
• アルゴリズム
• 単位時間(1分間)内に発生したイベントをUID別に数え上げる
• SAQL
SELECT eventName, count(distinct uid) as u_count, System.Timestamp as time
INTO [kosho-output4]
FROM [kosho-input2] timestamp by EventEnqueuedUtcTime
GROUP BY eventName, TumblingWindow(minute,1)
• 出力
{"eventname":"playing”, "u_count":1,"time":"2018-01-25T02:19:00.0000000Z"}
{"eventname":"timeupdate",“u_count”:6,”time”:”2018-01-25T02:19:00.0000000Z"}
Copyright (c) kosho.org
56
SAQLによる視聴解析
58. • 同時視聴数
• アルゴリズム
• 単位時間(1分間)内に発生した”timeupdate”をUID別に数え上げる
• SAQL
SELECT count(distinct uid) as u_count, System.Timestamp as time
INTO [kosho-output4]
FROM [kosho-input2] timestamp by EventEnqueuedUtcTime
WHERE eventName = ‘timeupdate’
GROUP BY TumblingWindow(minute,1)
• 出力
{"u_count":1,"time":"2018-01-25T02:19:00.0000000Z"}
{"u_count":3,"time":"2018-01-25T02:20:00.0000000Z”}
{“u_count”:6,”time”:”2018-01-25T02:21:00.0000000Z"}
Copyright (c) kosho.org
58
SAQLによる視聴解析