1
0

sample.asciidoc 531 B

123456789101112131415161718192021222324252627282930
  1. [discrete]
  2. [[esql-sample]]
  3. === `SAMPLE`
  4. preview::[]
  5. The `SAMPLE` command samples a fraction of the table rows.
  6. **Syntax**
  7. [source,esql]
  8. ----
  9. SAMPLE probability
  10. ----
  11. *Parameters*
  12. `probability`::
  13. The probability that a row is included in the sample. The value must be between 0 and 1, exclusive.
  14. *Example*
  15. [source.merge.styled,esql]
  16. ----
  17. include::{esql-specs}/sample.csv-spec[tag=sampleForDocs]
  18. ----
  19. [%header.monospaced.styled,format=dsv,separator=|]
  20. |===
  21. include::{esql-specs}/sample.csv-spec[tag=sampleForDocs-result]
  22. |===