Skip to content

Commit d887e7d

Browse files
authored
Add doc for min/max_over_time (#130269)
Add the initial docs structure for the TS command and time-series aggregation. More content will be added later.
1 parent debb95a commit d887e7d

File tree

38 files changed

+778
-6
lines changed

38 files changed

+778
-6
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## `TS` [esql-ts]
2+
3+
The `TS` command is similar to the `FROM` source command,
4+
but with two key differences: it targets only [time-series indices](docs-content://manage-data/data-store/data-streams/time-series-data-stream-tsds.md)
5+
and enables the use of time-series aggregation functions
6+
with the [STATS](/reference/query-languages/esql/commands/processing-commands.md#esql-stats-by) command.
7+
8+
**Syntax**
9+
10+
```esql
11+
TS index_pattern [METADATA fields]
12+
```
13+
14+
**Parameters**
15+
16+
`index_pattern`
17+
: A list of indices, data streams or aliases. Supports wildcards and date math.
18+
19+
`fields`
20+
: A comma-separated list of [metadata fields](/reference/query-languages/esql/esql-metadata-fields.md) to retrieve.
21+
22+
**Examples**
23+
24+
```esql
25+
TS metrics
26+
| STATS sum(last_over_time(memory_usage))
27+
```
28+

docs/reference/query-languages/esql/_snippets/functions/description/avg_over_time.md

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/description/max_over_time.md

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/description/min_over_time.md

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/examples/avg_over_time.md

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/examples/max_over_time.md

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/examples/min_over_time.md

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/layout/avg_over_time.md

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/layout/max_over_time.md

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/layout/min_over_time.md

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/parameters/avg_over_time.md

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/parameters/max_over_time.md

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/parameters/min_over_time.md

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/types/avg_over_time.md

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/types/max_over_time.md

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/types/min_over_time.md

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/lists/aggregation-functions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
* [`AVG`](../../functions-operators/aggregation-functions.md#esql-avg)
2+
* [unavailable] [`AVG_OVER_TIME`](../../functions-operators/aggregation-functions.md#esql-avg_over_time)
23
* [`COUNT`](../../functions-operators/aggregation-functions.md#esql-count)
34
* [`COUNT_DISTINCT`](../../functions-operators/aggregation-functions.md#esql-count_distinct)
45
* [`MAX`](../../functions-operators/aggregation-functions.md#esql-max)
6+
* [unavailable] [`MAX_OVER_TIME`](../../functions-operators/aggregation-functions.md#esql-max_over_time)
57
* [`MEDIAN`](../../functions-operators/aggregation-functions.md#esql-median)
68
* [`MEDIAN_ABSOLUTE_DEVIATION`](../../functions-operators/aggregation-functions.md#esql-median_absolute_deviation)
79
* [`MIN`](../../functions-operators/aggregation-functions.md#esql-min)
10+
* [unavailable] [`MIN_OVER_TIME`](../../functions-operators/aggregation-functions.md#esql-min_over_time)
811
* [`PERCENTILE`](../../functions-operators/aggregation-functions.md#esql-percentile)
912
* [preview] [`ST_CENTROID_AGG`](../../functions-operators/aggregation-functions.md#esql-st_centroid_agg)
1013
* [preview] [`ST_EXTENT_AGG`](../../functions-operators/aggregation-functions.md#esql-st_extent_agg)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
* [`FROM`](../../commands/source-commands.md#esql-from)
2+
* [`TS`](../../commands/source-commands.md#esql-ts)
23
* [`ROW`](../../commands/source-commands.md#esql-row)
34
* [`SHOW`](../../commands/source-commands.md#esql-show)

docs/reference/query-languages/esql/commands/source-commands.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ An {{esql}} source command produces a table, typically with data from {{es}}. An
2020
:::{include} ../_snippets/commands/layout/from.md
2121
:::
2222

23+
:::{include} ../_snippets/commands/layout/ts.md
24+
:::
25+
2326
:::{include} ../_snippets/commands/layout/row.md
2427
:::
2528

docs/reference/query-languages/esql/functions-operators/aggregation-functions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ The [`STATS`](/reference/query-languages/esql/commands/processing-commands.md#es
1515
:::{include} ../_snippets/functions/layout/avg.md
1616
:::
1717

18+
:::{include} ../_snippets/functions/layout/avg_over_time.md
19+
:::
20+
1821
:::{include} ../_snippets/functions/layout/count.md
1922
:::
2023

@@ -24,6 +27,9 @@ The [`STATS`](/reference/query-languages/esql/commands/processing-commands.md#es
2427
:::{include} ../_snippets/functions/layout/max.md
2528
:::
2629

30+
:::{include} ../_snippets/functions/layout/max_over_time.md
31+
:::
32+
2733
:::{include} ../_snippets/functions/layout/median.md
2834
:::
2935

@@ -33,6 +39,9 @@ The [`STATS`](/reference/query-languages/esql/commands/processing-commands.md#es
3339
:::{include} ../_snippets/functions/layout/min.md
3440
:::
3541

42+
:::{include} ../_snippets/functions/layout/min_over_time.md
43+
:::
44+
3645
:::{include} ../_snippets/functions/layout/percentile.md
3746
:::
3847

docs/reference/query-languages/esql/images/functions/avg_over_time.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/reference/query-languages/esql/images/functions/max_over_time.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/reference/query-languages/esql/images/functions/min_over_time.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/reference/query-languages/esql/kibana/definition/functions/avg_over_time.json

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)