change_point.asciidoc 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. [discrete]
  2. [[esql-change_point]]
  3. === `CHANGE_POINT`
  4. [NOTE]
  5. ====
  6. The `CHANGE_POINT` command requires a https://www.elastic.co/subscriptions[platinum license].
  7. ====
  8. preview::[]
  9. `CHANGE_POINT` detects spikes, dips, and change points in a metric.
  10. **Syntax**
  11. [source,esql]
  12. ----
  13. CHANGE_POINT value [ON key] [AS type_name, pvalue_name]
  14. ----
  15. *Parameters*
  16. `value`
  17. : The column with the metric in which you want to detect a change point.
  18. `key`
  19. : The column with the key to order the values by. If not specified, `@timestamp` is used.
  20. `type_name`
  21. : The name of the output column with the change point type. If not specified, `type` is used.
  22. `pvalue_name`
  23. : The name of the output column with the p-value that indicates how extreme the change point is. If not specified, `pvalue` is used.
  24. [NOTE]
  25. ====
  26. There must be at least 22 values for change point detection. Fewer than 1,000 is preferred.
  27. ====
  28. *Example*
  29. [source.merge.styled,esql]
  30. ----
  31. include::{esql-specs}/change_point.csv-spec[tag=changePointForDocs]
  32. ----
  33. [%header.monospaced.styled,format=dsv,separator=|]
  34. |===
  35. include::{esql-specs}/change_point.csv-spec[tag=changePointForDocs-result]
  36. |===