transformresource.asciidoc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[transform-resource]]
  4. === {transform-cap} resources
  5. {transform-cap} resources relate to the <<transform-apis>>.
  6. For more information, see <<transforms>>.
  7. [discrete]
  8. [[transform-properties]]
  9. ==== {api-definitions-title}
  10. `description`::
  11. (string) A description of the {transform}.
  12. `dest`::
  13. (object) The destination for the {transform}. See
  14. <<transform-dest>>.
  15. `frequency`::
  16. (time units) The interval between checks for changes in the source indices
  17. when the {transform} is running continuously. Also determines the
  18. retry interval in the event of transient failures while the {transform} is
  19. searching or indexing. The minimum value is `1s` and the maximum is `1h`. The
  20. default value is `1m`.
  21. `id`::
  22. (string) A unique identifier for the {transform}.
  23. `pivot`::
  24. (object) The method for transforming the data. See
  25. <<transform-pivot>>.
  26. `source`::
  27. (object) The source of the data for the {transform}. See
  28. <<transform-source>>.
  29. [[transform-dest]]
  30. ==== Dest objects
  31. {transform-cap} resources contain `dest` objects. For example, when
  32. you create a {transform}, you must define its destination.
  33. [discrete]
  34. [[transform-dest-properties]]
  35. ===== {api-definitions-title}
  36. `index`::
  37. (string) The _destination index_ for the {transform}.
  38. `pipeline`::
  39. (string) The unique identifier for a <<pipeline,pipeline>>.
  40. [[transform-source]]
  41. ==== Source objects
  42. {transform-cap} resources contain `source` objects. For example, when
  43. you create a {transform}, you must define its source.
  44. [discrete]
  45. [[transform-source-properties]]
  46. ===== {api-definitions-title}
  47. `index`::
  48. (string or array) The _source indices_ for the {transform}. It can
  49. be a single index, an index pattern (for example, `"myindex*"`), or an array
  50. of indices (for example, `["index1", "index2"]`).
  51. `query`::
  52. (object) A query clause that retrieves a subset of data from the source index.
  53. See <<query-dsl>>.
  54. [[transform-pivot]]
  55. ==== Pivot objects
  56. {transform-cap} resources contain `pivot` objects, which define the
  57. pivot function `group by` fields and the aggregation to reduce the data.
  58. [discrete]
  59. [[transform-pivot-properties]]
  60. ===== {api-definitions-title}
  61. `aggregations` or `aggs`::
  62. (object) Defines how to aggregate the grouped data. The following composite
  63. aggregations are supported:
  64. +
  65. --
  66. * {ref}/search-aggregations-metrics-avg-aggregation.html[Average]
  67. * {ref}/search-aggregations-metrics-weight-avg-aggregation.html[Weighted Average]
  68. * {ref}/search-aggregations-metrics-cardinality-aggregation.html[Cardinality]
  69. * {ref}/search-aggregations-metrics-geobounds-aggregation.html[Geo Bounds]
  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. * {ref}/search-aggregations-pipeline-bucket-selector-aggregation.html[Bucket Selector]
  78. IMPORTANT: {transforms-cap} support a subset of the functionality in
  79. composite aggregations. See <<transform-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. [[transform-example]]
  96. ==== {api-examples-title}
  97. See the
  98. <<put-transform-example,create {transforms} API examples>>.