mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[ES|QL] Adds inline docs for the SAMPLE command (#224806)
This PR adds inline docs for the CHANGE POINT command. It mimics the content currently at https://www.elastic.co/docs/reference/query-languages/esql/commands/processing-commands#esql-sample <img width="526" alt="image" src="https://github.com/user-attachments/assets/2eb9e99c-d768-4149-98b1-ec90717dc51b" /> Closes: https://github.com/elastic/docs-content/issues/1825
This commit is contained in:
parent
3a235538a0
commit
7127fa4e56
1 changed files with 50 additions and 0 deletions
|
@ -574,6 +574,56 @@ FROM employees
|
|||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: i18n.translate('languageDocumentation.documentationESQL.sampleCommand', {
|
||||
defaultMessage: 'SAMPLE',
|
||||
}),
|
||||
preview: true,
|
||||
description: (
|
||||
<Markdown
|
||||
openLinksInNewTab={true}
|
||||
markdownContent={i18n.translate(
|
||||
'languageDocumentation.documentationESQL.sampleCommand.markdown',
|
||||
{
|
||||
defaultMessage: `### SAMPLE
|
||||
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.
|
||||
|
||||
**Example**
|
||||
|
||||
The following example shows the detection of a step change:
|
||||
|
||||
\`\`\` esql
|
||||
FROM employees
|
||||
| KEEP emp_no
|
||||
| SAMPLE 0.05
|
||||
\`\`\`
|
||||
|
||||
| emp_no:integer |
|
||||
|----------------|
|
||||
| 10018 |
|
||||
| 10024 |
|
||||
| 10062 |
|
||||
| 10081 |
|
||||
|
||||
`,
|
||||
ignoreTag: true,
|
||||
description:
|
||||
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
|
||||
}
|
||||
)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: i18n.translate('languageDocumentation.documentationESQL.sort', {
|
||||
defaultMessage: 'SORT',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue