transformresource.asciidoc 3.8 KB

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