transformresource.asciidoc 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[data-frame-transform-resource]]
  4. === {dataframe-transform-cap} resources
  5. {dataframe-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 {dataframe-transform}.
  13. `dest`::
  14. (object) The destination for the {dataframe-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 {dataframe-transform} is running continuously. Also determines the
  19. retry interval in the event of transient failures while the {dataframe-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 {dataframe-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 {dataframe-transform}. See
  29. <<data-frame-transform-source>>.
  30. [[data-frame-transform-dest]]
  31. ==== Dest objects
  32. {dataframe-transform-cap} resources contain `dest` objects. For example, when
  33. you create a {dataframe-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 {dataframe-transform}.
  39. `pipeline`::
  40. (string) The unique identifier for a <<pipeline,pipeline>>.
  41. [[data-frame-transform-source]]
  42. ==== Source objects
  43. {dataframe-transform-cap} resources contain `source` objects. For example, when
  44. you create a {dataframe-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 {dataframe-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. {dataframe-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-geocentroid-aggregation.html[Geo Centroid]
  71. * {ref}/search-aggregations-metrics-max-aggregation.html[Max]
  72. * {ref}/search-aggregations-metrics-min-aggregation.html[Min]
  73. * {ref}/search-aggregations-metrics-scripted-metric-aggregation.html[Scripted Metric]
  74. * {ref}/search-aggregations-metrics-sum-aggregation.html[Sum]
  75. * {ref}/search-aggregations-metrics-valuecount-aggregation.html[Value Count]
  76. * {ref}/search-aggregations-pipeline-bucket-script-aggregation.html[Bucket Script]
  77. IMPORTANT: {dataframe-transforms-cap} support a subset of the functionality in
  78. composite aggregations. See
  79. {stack-ov}/dataframe-limitations.html[{dataframe-cap} limitations].
  80. --
  81. `group_by`::
  82. (object) Defines how to group the data. More than one grouping can be defined
  83. per pivot. The following groupings are supported:
  84. +
  85. --
  86. * {ref}/search-aggregations-bucket-composite-aggregation.html#_terms[Terms]
  87. * {ref}/search-aggregations-bucket-composite-aggregation.html#_histogram[Histogram]
  88. * {ref}/search-aggregations-bucket-composite-aggregation.html#_date_histogram[Date Histogram]
  89. --
  90. `max_page_search_size`::
  91. (integer) Defines the initial page size to use for the composite aggregation
  92. for each checkpoint. If circuit breaker exceptions occur, the page size is
  93. dynamically adjusted to a lower value. The minimum value is `10` and the
  94. maximum is `10,000`. The default value is `500`.
  95. [[data-frame-transform-example]]
  96. ==== {api-examples-title}
  97. See the
  98. <<put-data-frame-transform-example,create {dataframe-transforms} API examples>>.