mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
ES|QL sample documentation (#129350)
* ES|QL sample documentation * Update docs/reference/query-languages/esql/_snippets/commands/layout/sample.md Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com> --------- Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
This commit is contained in:
parent
65cbccc1fd
commit
df76c15edd
5 changed files with 66 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
% This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
||||
|
||||
```esql
|
||||
FROM employees
|
||||
| KEEP emp_no
|
||||
| SAMPLE 0.05
|
||||
```
|
||||
|
||||
| emp_no:integer |
|
||||
| --- |
|
||||
| 10018 |
|
||||
| 10024 |
|
||||
| 10062 |
|
||||
| 10081 |
|
|
@ -0,0 +1,23 @@
|
|||
## `SAMPLE` [esql-sample]
|
||||
|
||||
```yaml {applies_to}
|
||||
stack: preview 9.1
|
||||
```
|
||||
|
||||
The `SAMPLE` command samples a fraction of the table rows.
|
||||
|
||||
**Syntax**
|
||||
|
||||
```esql
|
||||
SAMPLE probability
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
`probability`
|
||||
: The probability that a row is included in the sample. The value must be between 0 and 1, exclusive.
|
||||
|
||||
**Examples**
|
||||
|
||||
:::{include} ../examples/sample.csv-spec/sampleForDocs.md
|
||||
:::
|
|
@ -9,6 +9,7 @@
|
|||
* [preview] [`LOOKUP JOIN`](../../commands/processing-commands.md#esql-lookup-join)
|
||||
* [preview] [`MV_EXPAND`](../../commands/processing-commands.md#esql-mv_expand)
|
||||
* [`RENAME`](../../commands/processing-commands.md#esql-rename)
|
||||
* [preview] [`SAMPLE`](../../commands/processing-commands.md#esql-sample)
|
||||
* [`SORT`](../../commands/processing-commands.md#esql-sort)
|
||||
* [`STATS`](../../commands/processing-commands.md#esql-stats-by)
|
||||
* [`WHERE`](../../commands/processing-commands.md#esql-where)
|
||||
|
|
|
@ -50,6 +50,9 @@ mapped_pages:
|
|||
:::{include} ../_snippets/commands/layout/rename.md
|
||||
:::
|
||||
|
||||
:::{include} ../_snippets/commands/layout/sample.md
|
||||
:::
|
||||
|
||||
:::{include} ../_snippets/commands/layout/sort.md
|
||||
:::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue