overview.asciidoc 3.1 KB

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