[DOCS] Adds placeholder for data frame preview API (#40232)

This commit is contained in:
Lisa Cawley 2019-03-20 10:19:41 -07:00 committed by lcawl
parent 606411bce8
commit 75a788ec5d
3 changed files with 94 additions and 0 deletions

View File

@ -0,0 +1,13 @@
[role="xpack"]
[testenv="basic"]
[[data-frame-apis]]
== {dataframe-cap} APIs
[float]
[[data-frame-transform-apis]]
=== {dataframe-transforms-cap}
* <<preview-data-frame-transform,Preview {dataframe-transforms}>>
//PREVIEW
include::preview-data-frame-transform.asciidoc[]

View File

@ -0,0 +1,80 @@
[role="xpack"]
[testenv="basic"]
[[preview-data-frame-transform]]
=== Preview {dataframe-transforms} API
++++
<titleabbrev>Preview {dataframe-transforms}</titleabbrev>
++++
Previews a {dataframe-transform}.
==== Request
`POST _data_frame/transforms/_preview`
//==== Description
//==== Path Parameters
//==== Authorization
==== Request Body
`source`:: The source index or index pattern.
`pivot`:: Defines the pivot function `group by` fields and the aggregation to
reduce the data.
==== Examples
The following example obtains a preview of a {dataframe-transform} on the {kib}
eCommerce sample data:
[source,js]
--------------------------------------------------
POST _data_frame/transforms/_preview
{
"source": "kibana_sample_data_ecommerce",
"pivot": {
"group_by": {
"customer_id": {
"terms": {
"field": "customer_id"
}
}
},
"aggregations": {
"max_price": {
"max": {
"field": "taxful_total_price"
}
}
}
}
}
--------------------------------------------------
// CONSOLE
// TEST[skip:set up sample data]
The data that is returned for this example is as follows:
[source,js]
----
{
"preview" : [
{
"max_price" : 171.0,
"customer_id" : "10"
},
{
"max_price" : 233.0,
"customer_id" : "11"
},
{
"max_price" : 200.0,
"customer_id" : "12"
}
...
]
}
----
// NOTCONSOLE

View File

@ -23,6 +23,7 @@ directly to configure and access {xpack} features.
include::info.asciidoc[]
include::{es-repo-dir}/ccr/apis/ccr-apis.asciidoc[]
include::{es-repo-dir}/data-frames/apis/index.asciidoc[]
include::{es-repo-dir}/graph/explore.asciidoc[]
include::{es-repo-dir}/indices/apis/freeze.asciidoc[]
include::{es-repo-dir}/ilm/apis/ilm-api.asciidoc[]