Browse Source

[DOCS] Defines data frame transform resources (#43996)

Co-Authored-By: István Zoltán Szabó <istvan.szabo@elastic.co>
Lisa Cawley 6 years ago
parent
commit
56de569c69

+ 1 - 1
docs/reference/data-frames/apis/get-transform.asciidoc

@@ -88,7 +88,7 @@ are no matches or only partial matches.
 
 
 `transforms`::
 `transforms`::
   (array) An array of transform resources, which are sorted by the `id` value in
   (array) An array of transform resources, which are sorted by the `id` value in
-  ascending order.
+  ascending order. See <<data-frame-transform-resource>>.
   
   
 [[get-data-frame-transform-response-codes]]
 [[get-data-frame-transform-response-codes]]
 ==== {api-response-codes-title}
 ==== {api-response-codes-title}

+ 0 - 26
docs/reference/data-frames/apis/pivotresource.asciidoc

@@ -1,26 +0,0 @@
-[role="xpack"]
-[testenv="basic"]
-[[data-frame-transform-pivot]]
-=== Pivot resources
-
-A pivot configuration object has the following properties:
-
-`group_by` (required):: (object) Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are supported:
-* {ref}/search-aggregations-bucket-composite-aggregation.html#_terms[Terms]
-* {ref}/search-aggregations-bucket-composite-aggregation.html#_histogram[Histogram]
-* {ref}/search-aggregations-bucket-composite-aggregation.html#_date_histogram[Date Histogram]
-
-`aggregations` (required):: (object) Defines how to aggregate the grouped data.
-The following aggregations are supported:
-* {ref}/search-aggregations-metrics-avg-aggregation.html[Average]
-* {ref}/search-aggregations-metrics-weight-avg-aggregation.html[Weighted Average]
-* {ref}/search-aggregations-metrics-cardinality-aggregation.html[Cardinality]
-* {ref}/search-aggregations-metrics-geocentroid-aggregation.html[Geo Centroid]
-* {ref}/search-aggregations-metrics-max-aggregation.html[Max]
-* {ref}/search-aggregations-metrics-min-aggregation.html[Min]
-* {ref}/search-aggregations-metrics-scripted-metric-aggregation.html[Scripted Metric]
-* {ref}/search-aggregations-metrics-sum-aggregation.html[Sum]
-* {ref}/search-aggregations-metrics-valuecount-aggregation.html[Value Count]
-* {ref}/search-aggregations-pipeline-bucket-script-aggregation.html[Bucket Script]
-
-//For more information, see {stack-ov}/ml-dataframes.html[dataframes-cap}].

+ 2 - 2
docs/reference/data-frames/apis/put-transform.asciidoc

@@ -58,7 +58,7 @@ IMPORTANT:  You must use {kib} or this API to create a {dataframe-transform}.
 
 
 `dest` (Required)::
 `dest` (Required)::
   (object) The destination configuration, which consists of `index` and
   (object) The destination configuration, which consists of `index` and
-  optionally a `pipeline` id.
+  optionally a `pipeline` id. See <<data-frame-transform-dest>>.
 
 
 `pivot` (Optional)::
 `pivot` (Optional)::
   (object) Defines the pivot function `group by` fields and the aggregation to
   (object) Defines the pivot function `group by` fields and the aggregation to
@@ -66,7 +66,7 @@ IMPORTANT:  You must use {kib} or this API to create a {dataframe-transform}.
 
 
 `source` (Required)::
 `source` (Required)::
   (object) The source configuration, which consists of `index` and optionally
   (object) The source configuration, which consists of `index` and optionally
-  a `query`.
+  a `query`. See <<data-frame-transform-source>>.
 
 
 [discrete]
 [discrete]
 [[put-data-frame-transform-example]]
 [[put-data-frame-transform-example]]

+ 112 - 0
docs/reference/data-frames/apis/transformresource.asciidoc

@@ -0,0 +1,112 @@
+[role="xpack"]
+[testenv="basic"]
+[[data-frame-transform-resource]]
+=== {dataframe-transform-cap} resources
+
+{dataframe-transform-cap} resources relate to the <<data-frame-apis>>.
+
+For more information, see
+{stack-ov}/ecommerce-dataframes.html[Transforming your data with {dataframes}].
+
+[discrete]
+[[data-frame-transform-properties]]
+==== {api-definitions-title}
+
+`description`::
+  (string) A description of the {dataframe-transform}.
+
+`dest`::
+  (object) The destination for the {dataframe-transform}. See
+  <<data-frame-transform-dest>>.
+
+`id`::
+  (string) A unique identifier for the {dataframe-transform}.
+
+`pivot`::
+  (object) The method for transforming the data. See
+  <<data-frame-transform-pivot>>. 
+
+`source`:: 
+  (object) The source of the data for the {dataframe-transform}. See
+  <<data-frame-transform-source>>.
+
+[[data-frame-transform-dest]]
+==== Dest objects
+
+{dataframe-transform-cap} resources contain `dest` objects. For example, when
+you create a {dataframe-transform}, you must define its destination.
+
+[discrete]
+[[data-frame-transform-dest-properties]]
+===== {api-definitions-title}
+
+`index`:: 
+  (string) The _destination index_ for the {dataframe-transform}.
+
+`pipeline`::
+  (string) The unique identifier for a <<pipeline,pipeline>>.
+
+[[data-frame-transform-source]]
+==== Source objects
+
+{dataframe-transform-cap} resources contain `source` objects. For example, when
+you create a {dataframe-transform}, you must define its source.
+
+[discrete]
+[[data-frame-transform-source-properties]]
+===== {api-definitions-title}
+
+`index`:: 
+  (array) The _source index_ for the {dataframe-transform}.
+
+`query`::
+  (object) A query clause that retrieves a subset of data from the source index.
+  See <<query-dsl>>.
+  
+[[data-frame-transform-pivot]]
+==== Pivot objects
+
+{dataframe-transform-cap} resources contain `pivot` objects, which define the
+pivot function `group by` fields and the aggregation to reduce the data.
+
+[discrete]
+[[data-frame-transform-pivot-properties]]
+===== {api-definitions-title}
+
+`aggregations` or `aggs`::
+(object) Defines how to aggregate the grouped data. The following composite
+aggregations are supported:
++
+--
+* {ref}/search-aggregations-metrics-avg-aggregation.html[Average]
+* {ref}/search-aggregations-metrics-weight-avg-aggregation.html[Weighted Average]
+* {ref}/search-aggregations-metrics-cardinality-aggregation.html[Cardinality]
+* {ref}/search-aggregations-metrics-geocentroid-aggregation.html[Geo Centroid]
+* {ref}/search-aggregations-metrics-max-aggregation.html[Max]
+* {ref}/search-aggregations-metrics-min-aggregation.html[Min]
+* {ref}/search-aggregations-metrics-scripted-metric-aggregation.html[Scripted Metric]
+* {ref}/search-aggregations-metrics-sum-aggregation.html[Sum]
+* {ref}/search-aggregations-metrics-valuecount-aggregation.html[Value Count]
+* {ref}/search-aggregations-pipeline-bucket-script-aggregation.html[Bucket Script]
+
+IMPORTANT: {dataframe-transforms-cap} support a subset of the functionality in
+composite aggregations. See
+{stack-ov}/dataframe-limitations.html[{dataframe-cap} limitations].
+
+--
+
+`group_by`::
+(object) Defines how to group the data. More than one grouping can be defined
+per pivot. The following groupings are supported:
++
+--
+* {ref}/search-aggregations-bucket-composite-aggregation.html#_terms[Terms]
+* {ref}/search-aggregations-bucket-composite-aggregation.html#_histogram[Histogram]
+* {ref}/search-aggregations-bucket-composite-aggregation.html#_date_histogram[Date Histogram]
+--
+
+[[data-frame-transform-example]]
+==== {api-examples-title}
+
+See the
+<<put-data-frame-transform-example,create {dataframe-transforms} API examples>>.

+ 2 - 2
docs/reference/rest-api/defs.asciidoc

@@ -8,22 +8,22 @@ These resource definitions are used in APIs related to {ml-features} and
 * <<ml-calendar-resource,Calendars>>
 * <<ml-calendar-resource,Calendars>>
 * <<ml-datafeed-resource,{dfeeds-cap}>>
 * <<ml-datafeed-resource,{dfeeds-cap}>>
 * <<ml-datafeed-counts,{dfeed-cap} counts>>
 * <<ml-datafeed-counts,{dfeed-cap} counts>>
+* <<data-frame-transform-resource,{dataframe-transforms-cap}>>
 * <<ml-filter-resource,Filters>>
 * <<ml-filter-resource,Filters>>
 * <<ml-job-resource,Jobs>>
 * <<ml-job-resource,Jobs>>
 * <<ml-jobstats,Job statistics>>
 * <<ml-jobstats,Job statistics>>
 * <<ml-snapshot-resource,Model snapshots>>
 * <<ml-snapshot-resource,Model snapshots>>
-* <<data-frame-transform-pivot,Pivots>>
 * <<ml-results-resource,Results>>
 * <<ml-results-resource,Results>>
 * <<role-mapping-resources,Role mappings>>
 * <<role-mapping-resources,Role mappings>>
 * <<ml-event-resource,Scheduled Events>>
 * <<ml-event-resource,Scheduled Events>>
 
 
 include::{es-repo-dir}/ml/apis/calendarresource.asciidoc[]
 include::{es-repo-dir}/ml/apis/calendarresource.asciidoc[]
 include::{es-repo-dir}/ml/apis/datafeedresource.asciidoc[]
 include::{es-repo-dir}/ml/apis/datafeedresource.asciidoc[]
+include::{es-repo-dir}/data-frames/apis/transformresource.asciidoc[]
 include::{es-repo-dir}/ml/apis/filterresource.asciidoc[]
 include::{es-repo-dir}/ml/apis/filterresource.asciidoc[]
 include::{es-repo-dir}/ml/apis/jobresource.asciidoc[]
 include::{es-repo-dir}/ml/apis/jobresource.asciidoc[]
 include::{es-repo-dir}/ml/apis/jobcounts.asciidoc[]
 include::{es-repo-dir}/ml/apis/jobcounts.asciidoc[]
 include::{es-repo-dir}/ml/apis/snapshotresource.asciidoc[]
 include::{es-repo-dir}/ml/apis/snapshotresource.asciidoc[]
-include::{es-repo-dir}/data-frames/apis/pivotresource.asciidoc[]
 include::{xes-repo-dir}/rest-api/security/role-mapping-resources.asciidoc[]
 include::{xes-repo-dir}/rest-api/security/role-mapping-resources.asciidoc[]
 include::{es-repo-dir}/ml/apis/resultsresource.asciidoc[]
 include::{es-repo-dir}/ml/apis/resultsresource.asciidoc[]
 include::{es-repo-dir}/ml/apis/eventresource.asciidoc[]
 include::{es-repo-dir}/ml/apis/eventresource.asciidoc[]