earliest
earliest 函数会返回一组记录中最早的时间戳,精确到微秒。
| 语法 | 形参数据类型 | 返回值类型 |
|---|---|---|
earliest(timestamp) |
TIMESTAMP |
TIMESTAMP |
代码示例
对于所有与
hostname匹配的事件,将最早的metadata.event_timestamp存储在start变量中。$hostname = principal.hostname match: $hostname outcome: $start = earliest(metadata.event_timestamp)