You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何清理非唯一事件日志并按规则生成unique_id?

服务器日志数据清理:自定义事件顺序匹配需求

需求规则

  • 同一id、timestamp下,符合指定顺序的事件需归为同一unique_id
  • 后续行若符合该顺序,沿用前一行的unique_id

当前日志数据

ideventtimestamp
10032022-08-25 12:59:00
10042022-08-25 13:00:00
10032022-08-25 13:00:00
10002022-08-25 13:00:00
10022022-08-25 13:00:00
10012022-08-25 13:00:00
10032022-08-25 13:01:00

期望处理结果

ideventtimestampunique_id
10032022-08-25 12:59:0010
10042022-08-25 13:00:0010
10002022-08-25 13:00:0011
10012022-08-25 13:00:0011
10022022-08-25 13:00:0011
10032022-08-25 13:00:0011
10032022-08-25 13:01:0011

核心疑问

能否通过设置自定义事件顺序,让日志处理结果完全匹配上述期望格式?


内容的提问来源于stack exchange,提问作者WhimsicalWhale

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.21 01:45:42