forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtstep.json
More file actions
38 lines (38 loc) · 1.5 KB
/
tstep.json
File metadata and controls
38 lines (38 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
"type" : "grouping",
"name" : "tstep",
"description" : "Creates end-aligned time buckets over @timestamp using a fixed step. The end anchor is taken from TRANGE when present,\nor from the current query time otherwise.",
"signatures" : [
{
"params" : [
{
"name" : "step",
"type" : "time_duration",
"optional" : false,
"description" : "Fixed step size. Buckets are anchored to the end of TRANGE, or the current query time when TRANGE is absent."
}
],
"variadic" : false,
"returnType" : "date"
},
{
"params" : [
{
"name" : "step",
"type" : "time_duration",
"optional" : false,
"description" : "Fixed step size. Buckets are anchored to the end of TRANGE, or the current query time when TRANGE is absent."
}
],
"variadic" : false,
"returnType" : "date_nanos"
}
],
"examples" : [
"FROM sample_data\n| WHERE TRANGE(\"2023-10-23T12:15:00.000Z\", \"2023-10-23T13:55:01.543Z\")\n| STATS min = MIN(@timestamp), max = MAX(@timestamp) BY bucket = TSTEP(1 hour)\n| SORT min",
"FROM sample_data\n| WHERE TRANGE(\"2023-10-23T12:15:00.000Z\", \"2023-10-23T13:55:01.543Z\")\n| STATS min = MIN(@timestamp), max = MAX(@timestamp) BY bucket = TSTEP(\"1 hour\")\n| SORT min"
],
"preview" : false,
"snapshot_only" : false
}