overview.asciidoc 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. [role="xpack"]
  2. [[transform-overview]]
  3. === {transform-cap} overview
  4. ++++
  5. <titleabbrev>Overview</titleabbrev>
  6. ++++
  7. You can use {transforms} to _pivot_ your data into a new entity-centric index.
  8. By transforming and summarizing your data, it becomes possible to visualize and
  9. analyze it in alternative and interesting ways.
  10. A lot of {es} indices are organized as a stream of events: each event is an
  11. individual document, for example a single item purchase. {transforms-cap} enable
  12. you to summarize this data, bringing it into an organized, more
  13. analysis-friendly format. For example, you can summarize all the purchases of a
  14. single customer.
  15. {transforms-cap} enable you to define a pivot, which is a set of
  16. features that transform the index into a different, more digestible format.
  17. Pivoting results in a summary of your data in a new index.
  18. To define a pivot, first you select one or more fields that you will use to
  19. group your data. You can select categorical fields (terms) and numerical fields
  20. for grouping. If you use numerical fields, the field values are bucketed using
  21. an interval that you specify.
  22. The second step is deciding how you want to aggregate the grouped data. When
  23. using aggregations, you practically ask questions about the index. There are
  24. different types of aggregations, each with its own purpose and output. To learn
  25. more about the supported aggregations and group-by fields, see
  26. {ref}/transform-resource.html[{transform-cap} resources].
  27. As an optional step, you can also add a query to further limit the scope of the
  28. aggregation.
  29. The {transform} performs a composite aggregation that paginates through all the
  30. data defined by the source index query. The output of the aggregation is stored
  31. in a destination index. Each time the {transform} queries the source index, it
  32. creates a _checkpoint_. You can decide whether you want the {transform} to run
  33. once (batch {transform}) or continuously ({ctransform}). A batch {transform} is a
  34. single operation that has a single checkpoint. {ctransforms-cap} continually
  35. increment and process checkpoints as new source data is ingested.
  36. .Example
  37. Imagine that you run a webshop that sells clothes. Every order creates a
  38. document that contains a unique order ID, the name and the category of the
  39. ordered product, its price, the ordered quantity, the exact date of the order,
  40. and some customer information (name, gender, location, etc). Your dataset
  41. contains all the transactions from last year.
  42. If you want to check the sales in the different categories in your last fiscal
  43. year, define a {transform} that groups the data by the product categories
  44. (women's shoes, men's clothing, etc.) and the order date. Use the last year as
  45. the interval for the order date. Then add a sum aggregation on the ordered
  46. quantity. The result is an entity-centric index that shows the number of sold
  47. items in every product category in the last year.
  48. [role="screenshot"]
  49. image::images/pivot-preview.jpg["Example of a {transform} pivot in {kib}"]
  50. IMPORTANT: The {transform} leaves your source index intact. It
  51. creates a new index that is dedicated to the transformed data.