transformresource.asciidoc 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. `id`::
  17. (string) A unique identifier for the {dataframe-transform}.
  18. `pivot`::
  19. (object) The method for transforming the data. See
  20. <<data-frame-transform-pivot>>.
  21. `source`::
  22. (object) The source of the data for the {dataframe-transform}. See
  23. <<data-frame-transform-source>>.
  24. [[data-frame-transform-dest]]
  25. ==== Dest objects
  26. {dataframe-transform-cap} resources contain `dest` objects. For example, when
  27. you create a {dataframe-transform}, you must define its destination.
  28. [discrete]
  29. [[data-frame-transform-dest-properties]]
  30. ===== {api-definitions-title}
  31. `index`::
  32. (string) The _destination index_ for the {dataframe-transform}.
  33. `pipeline`::
  34. (string) The unique identifier for a <<pipeline,pipeline>>.
  35. [[data-frame-transform-source]]
  36. ==== Source objects
  37. {dataframe-transform-cap} resources contain `source` objects. For example, when
  38. you create a {dataframe-transform}, you must define its source.
  39. [discrete]
  40. [[data-frame-transform-source-properties]]
  41. ===== {api-definitions-title}
  42. `index`::
  43. (array) The _source index_ for the {dataframe-transform}.
  44. `query`::
  45. (object) A query clause that retrieves a subset of data from the source index.
  46. See <<query-dsl>>.
  47. [[data-frame-transform-pivot]]
  48. ==== Pivot objects
  49. {dataframe-transform-cap} resources contain `pivot` objects, which define the
  50. pivot function `group by` fields and the aggregation to reduce the data.
  51. [discrete]
  52. [[data-frame-transform-pivot-properties]]
  53. ===== {api-definitions-title}
  54. `aggregations` or `aggs`::
  55. (object) Defines how to aggregate the grouped data. The following composite
  56. aggregations are supported:
  57. +
  58. --
  59. * {ref}/search-aggregations-metrics-avg-aggregation.html[Average]
  60. * {ref}/search-aggregations-metrics-weight-avg-aggregation.html[Weighted Average]
  61. * {ref}/search-aggregations-metrics-cardinality-aggregation.html[Cardinality]
  62. * {ref}/search-aggregations-metrics-geocentroid-aggregation.html[Geo Centroid]
  63. * {ref}/search-aggregations-metrics-max-aggregation.html[Max]
  64. * {ref}/search-aggregations-metrics-min-aggregation.html[Min]
  65. * {ref}/search-aggregations-metrics-scripted-metric-aggregation.html[Scripted Metric]
  66. * {ref}/search-aggregations-metrics-sum-aggregation.html[Sum]
  67. * {ref}/search-aggregations-metrics-valuecount-aggregation.html[Value Count]
  68. * {ref}/search-aggregations-pipeline-bucket-script-aggregation.html[Bucket Script]
  69. IMPORTANT: {dataframe-transforms-cap} support a subset of the functionality in
  70. composite aggregations. See
  71. {stack-ov}/dataframe-limitations.html[{dataframe-cap} limitations].
  72. --
  73. `group_by`::
  74. (object) Defines how to group the data. More than one grouping can be defined
  75. per pivot. The following groupings are supported:
  76. +
  77. --
  78. * {ref}/search-aggregations-bucket-composite-aggregation.html#_terms[Terms]
  79. * {ref}/search-aggregations-bucket-composite-aggregation.html#_histogram[Histogram]
  80. * {ref}/search-aggregations-bucket-composite-aggregation.html#_date_histogram[Date Histogram]
  81. --
  82. [[data-frame-transform-example]]
  83. ==== {api-examples-title}
  84. See the
  85. <<put-data-frame-transform-example,create {dataframe-transforms} API examples>>.