transformresource.asciidoc 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[data-frame-transform-resource]]
  4. === {transform-cap} resources
  5. {transform-cap} resources relate to the <<data-frame-apis>>.
  6. For more information, see
  7. {stack-ov}/ecommerce-dataframes.html[Transforming your data with {dataframes}].
  8. [discrete]
  9. [[data-frame-transform-properties]]
  10. ==== {api-definitions-title}
  11. `description`::
  12. (string) A description of the {transform}.
  13. `dest`::
  14. (object) The destination for the {transform}. See
  15. <<data-frame-transform-dest>>.
  16. `frequency`::
  17. (time units) The interval between checks for changes in the source indices
  18. when the {transform} is running continuously. Also determines the
  19. retry interval in the event of transient failures while the {transform} is
  20. searching or indexing. The minimum value is `1s` and the maximum is `1h`. The
  21. default value is `1m`.
  22. `id`::
  23. (string) A unique identifier for the {transform}.
  24. `pivot`::
  25. (object) The method for transforming the data. See
  26. <<data-frame-transform-pivot>>.
  27. `source`::
  28. (object) The source of the data for the {transform}. See
  29. <<data-frame-transform-source>>.
  30. [[data-frame-transform-dest]]
  31. ==== Dest objects
  32. {transform-cap} resources contain `dest` objects. For example, when
  33. you create a {transform}, you must define its destination.
  34. [discrete]
  35. [[data-frame-transform-dest-properties]]
  36. ===== {api-definitions-title}
  37. `index`::
  38. (string) The _destination index_ for the {transform}.
  39. `pipeline`::
  40. (string) The unique identifier for a <<pipeline,pipeline>>.
  41. [[data-frame-transform-source]]
  42. ==== Source objects
  43. {transform-cap} resources contain `source` objects. For example, when
  44. you create a {transform}, you must define its source.
  45. [discrete]
  46. [[data-frame-transform-source-properties]]
  47. ===== {api-definitions-title}
  48. `index`::
  49. (string or array) The _source indices_ for the {transform}. It can
  50. be a single index, an index pattern (for example, `"myindex*"`), or an array
  51. of indices (for example, `["index1", "index2"]`).
  52. `query`::
  53. (object) A query clause that retrieves a subset of data from the source index.
  54. See <<query-dsl>>.
  55. [[data-frame-transform-pivot]]
  56. ==== Pivot objects
  57. {transform-cap} resources contain `pivot` objects, which define the
  58. pivot function `group by` fields and the aggregation to reduce the data.
  59. [discrete]
  60. [[data-frame-transform-pivot-properties]]
  61. ===== {api-definitions-title}
  62. `aggregations` or `aggs`::
  63. (object) Defines how to aggregate the grouped data. The following composite
  64. aggregations are supported:
  65. +
  66. --
  67. * {ref}/search-aggregations-metrics-avg-aggregation.html[Average]
  68. * {ref}/search-aggregations-metrics-weight-avg-aggregation.html[Weighted Average]
  69. * {ref}/search-aggregations-metrics-cardinality-aggregation.html[Cardinality]
  70. * {ref}/search-aggregations-metrics-geobounds-aggregation.html[Geo Bounds]
  71. * {ref}/search-aggregations-metrics-geocentroid-aggregation.html[Geo Centroid]
  72. * {ref}/search-aggregations-metrics-max-aggregation.html[Max]
  73. * {ref}/search-aggregations-metrics-min-aggregation.html[Min]
  74. * {ref}/search-aggregations-metrics-scripted-metric-aggregation.html[Scripted Metric]
  75. * {ref}/search-aggregations-metrics-sum-aggregation.html[Sum]
  76. * {ref}/search-aggregations-metrics-valuecount-aggregation.html[Value Count]
  77. * {ref}/search-aggregations-pipeline-bucket-script-aggregation.html[Bucket Script]
  78. * {ref}/search-aggregations-pipeline-bucket-selector-aggregation.html[Bucket Selector]
  79. IMPORTANT: {transforms-cap} support a subset of the functionality in
  80. composite aggregations. See
  81. {stack-ov}/dataframe-limitations.html[{dataframe-cap} limitations].
  82. --
  83. `group_by`::
  84. (object) Defines how to group the data. More than one grouping can be defined
  85. per pivot. The following groupings are supported:
  86. +
  87. --
  88. * {ref}/search-aggregations-bucket-composite-aggregation.html#_terms[Terms]
  89. * {ref}/search-aggregations-bucket-composite-aggregation.html#_histogram[Histogram]
  90. * {ref}/search-aggregations-bucket-composite-aggregation.html#_date_histogram[Date Histogram]
  91. --
  92. `max_page_search_size`::
  93. (integer) Defines the initial page size to use for the composite aggregation
  94. for each checkpoint. If circuit breaker exceptions occur, the page size is
  95. dynamically adjusted to a lower value. The minimum value is `10` and the
  96. maximum is `10,000`. The default value is `500`.
  97. [[data-frame-transform-example]]
  98. ==== {api-examples-title}
  99. See the
  100. <<put-data-frame-transform-example,create {transforms} API examples>>.