[DOCS] Move transform resource definitions into APIs (#50108)

This commit is contained in:
Lisa Cawley 2019-12-17 09:01:31 -08:00 committed by lcawl
parent e3459637a7
commit 30d66828ae
13 changed files with 394 additions and 320 deletions

View File

@ -1,5 +1,5 @@
[[search-aggregations-bucket-composite-aggregation]] [[search-aggregations-bucket-composite-aggregation]]
=== Composite Aggregation === Composite aggregation
A multi-bucket aggregation that creates composite buckets from different sources. A multi-bucket aggregation that creates composite buckets from different sources.
@ -105,6 +105,7 @@ The name given to each sources must be unique.
There are three different types of values source: There are three different types of values source:
[[_terms]]
===== Terms ===== Terms
The `terms` value source is equivalent to a simple `terms` aggregation. The `terms` value source is equivalent to a simple `terms` aggregation.
@ -155,6 +156,7 @@ GET /_search
} }
-------------------------------------------------- --------------------------------------------------
[[_histogram]]
===== Histogram ===== Histogram
The `histogram` value source can be applied on numeric values to build fixed size The `histogram` value source can be applied on numeric values to build fixed size
@ -208,8 +210,8 @@ GET /_search
} }
-------------------------------------------------- --------------------------------------------------
[[_date_histogram]]
===== Date Histogram ===== Date histogram
The `date_histogram` is similar to the `histogram` value source except that the interval The `date_histogram` is similar to the `histogram` value source except that the interval
is specified by date/time expression: is specified by date/time expression:

View File

@ -878,17 +878,17 @@ See <<transform-resource>>.
[role="exclude",id="data-frame-transform-dest"] [role="exclude",id="data-frame-transform-dest"]
=== Dest objects === Dest objects
See <<transform-dest>>. See <<transform-resource>>.
[role="exclude",id="data-frame-transform-source"] [role="exclude",id="data-frame-transform-source"]
==== Source objects ==== Source objects
See <<transform-source>>. See <<transform-resource>>.
[role="exclude",id="data-frame-transform-pivot"] [role="exclude",id="data-frame-transform-pivot"]
==== Pivot objects ==== Pivot objects
See <<transform-pivot>>. See <<transform-resource>>.
[role="exclude",id="configuring-monitoring"] [role="exclude",id="configuring-monitoring"]
=== Configuring monitoring === Configuring monitoring
@ -1026,3 +1026,10 @@ See <<elasticsearch-security>>.
=== Rollup job configuration === Rollup job configuration
See <<rollup-put-job-api-request-body>>. See <<rollup-put-job-api-request-body>>.
[role="exclude",id="transform-resource"]
=== {transform-cap} resources
This page was deleted.
See <<put-transform>>, <<preview-transform>>, <<update-transform>>,
<<get-transform>>.

View File

@ -57,6 +57,42 @@ This parameter also applies to <<indices-aliases,index aliases>>
that point to a missing or closed index. that point to a missing or closed index.
end::allow-no-indices[] end::allow-no-indices[]
tag::allow-no-match-transforms1[]
Specifies what to do when the request:
+
--
* Contains wildcard expressions and there are no {transforms} that match.
* Contains the `_all` string or no identifiers and there are no matches.
* Contains wildcard expressions and there are only partial matches.
The default value is `true`, which returns an empty `transforms` array when
there are no matches and the subset of results when there are partial matches.
If this parameter is `false`, the request returns a `404` status code when there
are no matches or only partial matches.
--
end::allow-no-match-transforms1[]
tag::allow-no-match-transforms2[]
Specifies what to do when the request:
+
--
* Contains wildcard expressions and there are no {transforms} that match.
* Contains the `_all` string or no identifiers and there are no matches.
* Contains wildcard expressions and there are only partial matches.
The default value is `true`, which returns a successful acknowledgement message
when there are no matches. When there are only partial matches, the API stops
the appropriate {transforms}. For example, if the request contains
`test-id1*,test-id2*` as the identifiers and there are no {transforms}
that match `test-id2*`, the API nonetheless stops the {transforms}
that match `test-id1*`.
If this parameter is `false`, the request returns a `404` status code when there
are no matches or only partial matches.
--
end::allow-no-match-transforms2[]
tag::analyzer[] tag::analyzer[]
`analyzer`:: `analyzer`::
(Optional, string) Analyzer to use for the query string. (Optional, string) Analyzer to use for the query string.
@ -96,6 +132,18 @@ tag::default_operator[]
Defaults to `OR`. Defaults to `OR`.
end::default_operator[] end::default_operator[]
tag::dest[]
The destination for the {transform}.
end::dest[]
tag::dest-index[]
The _destination index_ for the {transform}.
end::dest-index[]
tag::dest-pipeline[]
The unique identifier for a <<pipeline,pipeline>>.
end::dest-pipeline[]
tag::detailed[] tag::detailed[]
`detailed`:: `detailed`::
(Optional, boolean) (Optional, boolean)
@ -202,11 +250,22 @@ https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html[HTTP accept header].
Valid values include JSON, YAML, etc. Valid values include JSON, YAML, etc.
end::http-format[] end::http-format[]
tag::frequency[]
The interval between checks for changes in the source indices when the
{transform} is running continuously. Also determines the retry interval in the
event of transient failures while the {transform} is searching or indexing. The
minimum value is `1s` and the maximum is `1h`. The default value is `1m`.
end::frequency[]
tag::from[] tag::from[]
`from`:: `from`::
(Optional, integer) Starting document offset. Defaults to `0`. (Optional, integer) Starting document offset. Defaults to `0`.
end::from[] end::from[]
tag::from-transforms[]
Skips the specified number of {transforms}. The default value is `0`.
end::from-transforms[]
tag::generation[] tag::generation[]
Generation number, such as `0`. {es} increments this generation number Generation number, such as `0`. {es} increments this generation number
for each segment written. {es} then uses this number to derive the segment name. for each segment written. {es} then uses this number to derive the segment name.
@ -484,6 +543,12 @@ or use a value of `-1`.
-- --
end::parent-task-id[] end::parent-task-id[]
tag::payloads[]
`payloads`::
(Optional, boolean) If `true`, the response includes term payloads.
Defaults to `true`.
end::payloads[]
tag::pipeline[] tag::pipeline[]
`pipeline`:: `pipeline`::
(Optional, string) ID of the pipeline to use to preprocess incoming documents. (Optional, string) ID of the pipeline to use to preprocess incoming documents.
@ -495,11 +560,52 @@ tag::path-pipeline[]
used to limit the request. used to limit the request.
end::path-pipeline[] end::path-pipeline[]
tag::payloads[] tag::pivot[]
`payloads`:: The method for transforming the data. These objects define the pivot function
(Optional, boolean) If `true`, the response includes term payloads. `group by` fields and the aggregation to reduce the data.
Defaults to `true`. end::pivot[]
end::payloads[]
tag::pivot-aggs[]
Defines how to aggregate the grouped data. The following composite aggregations
are supported:
+
--
* <<search-aggregations-metrics-avg-aggregation,Average>>
* <<search-aggregations-metrics-weight-avg-aggregation,Weighted average>>
* <<search-aggregations-metrics-cardinality-aggregation,Cardinality>>
* <<search-aggregations-metrics-geobounds-aggregation,Geo bounds>>
* <<search-aggregations-metrics-geocentroid-aggregation,Geo centroid>>
* <<search-aggregations-metrics-max-aggregation,Max>>
* <<search-aggregations-metrics-min-aggregation,Min>>
* <<search-aggregations-metrics-scripted-metric-aggregation,Scripted metric>>
* <<search-aggregations-metrics-sum-aggregation,Sum>>
* <<search-aggregations-metrics-valuecount-aggregation,Value count>>
* <<search-aggregations-pipeline-bucket-script-aggregation,Bucket script>>
* <<search-aggregations-pipeline-bucket-selector-aggregation,Bucket selector>>
IMPORTANT: {transforms-cap} support a subset of the functionality in
composite aggregations. See <<transform-limitations>>.
--
end::pivot-aggs[]
tag::pivot-group-by[]
Defines how to group the data. More than one grouping can be defined
per pivot. The following groupings are supported:
+
--
* <<_terms,Terms>>
* <<_histogram,Histogram>>
* <<_date_histogram,Date histogram>>
--
end::pivot-group-by[]
tag::pivot-max-page-search-size[]
Defines the initial page size to use for the composite aggregation for each
checkpoint. If circuit breaker exceptions occur, the page size is dynamically
adjusted to a lower value. The minimum value is `10` and the maximum is `10,000`.
The default value is `500`.
end::pivot-max-page-search-size[]
tag::positions[] tag::positions[]
`positions`:: `positions`::
@ -626,6 +732,11 @@ Configuration options for the target index.
See <<index-modules-settings>>. See <<index-modules-settings>>.
end::target-index-settings[] end::target-index-settings[]
tag::size-transforms[]
Specifies the maximum number of {transforms} to obtain. The default value is
`100`.
end::size-transforms[]
tag::slices[] tag::slices[]
`slices`:: `slices`::
(Optional, integer) The number of slices this task should be divided into. (Optional, integer) The number of slices this task should be divided into.
@ -655,6 +766,21 @@ tag::source_includes[]
field. field.
end::source_includes[] end::source_includes[]
tag::source-transforms[]
The source of the data for the {transform}.
end::source-transforms[]
tag::source-index-transforms[]
The _source indices_ for the {transform}. It can be a single index, an index
pattern (for example, `"myindex*"`), or an array of indices (for example,
`["index1", "index2"]`).
end::source-index-transforms[]
tag::source-query-transforms[]
A query clause that retrieves a subset of data from the source index. See
<<query-dsl>>.
end::source-query-transforms[]
tag::stats[] tag::stats[]
`stats`:: `stats`::
(Optional, string) Specific `tag` of the request for logging and statistical (Optional, string) Specific `tag` of the request for logging and statistical
@ -667,6 +793,24 @@ tag::stored_fields[]
index rather than the document `_source`. Defaults to `false`. index rather than the document `_source`. Defaults to `false`.
end::stored_fields[] end::stored_fields[]
tag::sync[]
Defines the properties {transforms} require to run continuously.
end::sync[]
tag::sync-time[]
Specifies that the {transform} uses a time field to synchronize the source and
destination indices.
end::sync-time[]
tag::sync-time-field[]
The date field that is used to identify new documents in the source.
end::sync-time-field[]
tag::sync-time-delay[]
The time delay between the current time and the latest input data time. The
default value is `60s`.
end::sync-time-delay[]
tag::target-index[] tag::target-index[]
`<target-index>`:: `<target-index>`::
+ +
@ -727,6 +871,18 @@ Comma-separated list or wildcard expression of types
used to limit the request. used to limit the request.
end::type[] end::type[]
tag::transform-id[]
Identifier for the {transform}. This identifier can contain lowercase
alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start
and end with alphanumeric characters.
end::transform-id[]
tag::transform-id-wildcard[]
Identifier for the {transform}. It can be a {transform} identifier or a wildcard
expression. If you do not specify one of these options, the API returns
information for all {transforms}.
end::transform-id-wildcard[]
tag::cat-v[] tag::cat-v[]
`v`:: `v`::
(Optional, boolean) If `true`, the response includes column headings. (Optional, boolean) If `true`, the response includes column headings.

View File

@ -12,7 +12,6 @@ These resource definitions are used in APIs related to {ml-features} and
* <<ml-snapshot-resource,{anomaly-detect-cap} model snapshots>> * <<ml-snapshot-resource,{anomaly-detect-cap} model snapshots>>
* <<ml-results-resource,{anomaly-detect-cap} results>> * <<ml-results-resource,{anomaly-detect-cap} results>>
* <<role-mapping-resources,Role mappings>> * <<role-mapping-resources,Role mappings>>
* <<transform-resource,{transforms-cap}>>
include::{es-repo-dir}/ml/anomaly-detection/apis/datafeedresource.asciidoc[] include::{es-repo-dir}/ml/anomaly-detection/apis/datafeedresource.asciidoc[]
include::{es-repo-dir}/ml/df-analytics/apis/analysisobjects.asciidoc[] include::{es-repo-dir}/ml/df-analytics/apis/analysisobjects.asciidoc[]
@ -21,4 +20,3 @@ include::{es-repo-dir}/ml/anomaly-detection/apis/jobresource.asciidoc[]
include::{es-repo-dir}/ml/anomaly-detection/apis/snapshotresource.asciidoc[] include::{es-repo-dir}/ml/anomaly-detection/apis/snapshotresource.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/anomaly-detection/apis/resultsresource.asciidoc[] include::{es-repo-dir}/ml/anomaly-detection/apis/resultsresource.asciidoc[]
include::{es-repo-dir}/transform/apis/transformresource.asciidoc[]

View File

@ -1,11 +1,11 @@
[role="xpack"] [role="xpack"]
[testenv="basic"] [testenv="basic"]
[[delete-transform]] [[delete-transform]]
=== Delete {transforms} API === Delete {transform} API
[subs="attributes"] [subs="attributes"]
++++ ++++
<titleabbrev>Delete {transforms}</titleabbrev> <titleabbrev>Delete {transform}</titleabbrev>
++++ ++++
Deletes an existing {transform}. Deletes an existing {transform}.
@ -31,7 +31,8 @@ these privileges. For more information, see <<security-privileges>> and
==== {api-path-parms-title} ==== {api-path-parms-title}
`<transform_id>`:: `<transform_id>`::
(Required, string) Identifier for the {transform}. (Required, string)
include::{docdir}/rest-api/common-parms.asciidoc[tag=transform-id]
[[delete-transform-query-parms]] [[delete-transform-query-parms]]
==== {api-query-parms-title} ==== {api-query-parms-title}

View File

@ -50,35 +50,24 @@ specifying `*` as the `<transform_id>`, or by omitting the
==== {api-path-parms-title} ==== {api-path-parms-title}
`<transform_id>`:: `<transform_id>`::
(Optional, string) Identifier for the {transform}. It can be a (Optional, string)
{transform} identifier or a wildcard expression. If you do not include::{docdir}/rest-api/common-parms.asciidoc[tag=transform-id-wildcard]
specify one of these options, the API returns information for all
{transforms}.
[[get-transform-stats-query-parms]] [[get-transform-stats-query-parms]]
==== {api-query-parms-title} ==== {api-query-parms-title}
`allow_no_match`:: `allow_no_match`::
(Optional, boolean) Specifies what to do when the request: (Optional, boolean)
+ include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-match-transforms1]
--
* Contains wildcard expressions and there are no {transforms} that match.
* Contains the `_all` string or no identifiers and there are no matches.
* Contains wildcard expressions and there are only partial matches.
The default value is `true`, which returns an empty `transforms` array when
there are no matches and the subset of results when there are partial matches.
If this parameter is `false`, the request returns a `404` status code when there
are no matches or only partial matches.
--
`from`:: `from`::
(Optional, integer) Skips the specified number of {transforms}. The (Optional, integer)
default value is `0`. include::{docdir}/rest-api/common-parms.asciidoc[tag=from-transforms]
`size`:: `size`::
(Optional, integer) Specifies the maximum number of {transforms} to obtain. The default value is `100`. (Optional, integer)
include::{docdir}/rest-api/common-parms.asciidoc[tag=size-transforms]
[[get-transform-stats-response]] [[get-transform-stats-response]]
==== {api-response-body-title} ==== {api-response-body-title}

View File

@ -45,41 +45,38 @@ specifying `*` as the `<transform_id>`, or by omitting the `<transform_id>`.
==== {api-path-parms-title} ==== {api-path-parms-title}
`<transform_id>`:: `<transform_id>`::
(Optional, string) Identifier for the {transform}. It can be a (Optional, string)
{transform} identifier or a wildcard expression. If you do not include::{docdir}/rest-api/common-parms.asciidoc[tag=transform-id-wildcard]
specify one of these options, the API returns information for all
{transforms}.
[[get-transform-query-parms]] [[get-transform-query-parms]]
==== {api-query-parms-title} ==== {api-query-parms-title}
`allow_no_match`:: `allow_no_match`::
(Optional, boolean) Specifies what to do when the request: (Optional, boolean)
+ include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-match-transforms1]
--
* Contains wildcard expressions and there are no {transforms} that match.
* Contains the `_all` string or no identifiers and there are no matches.
* Contains wildcard expressions and there are only partial matches.
The default value is `true`, which returns an empty `transforms` array when
there are no matches and the subset of results when there are partial matches.
If this parameter is `false`, the request returns a `404` status code when there
are no matches or only partial matches.
--
`from`:: `from`::
(Optional, integer) Skips the specified number of {transforms}. The (Optional, integer)
default value is `0`. include::{docdir}/rest-api/common-parms.asciidoc[tag=from-transforms]
`size`:: `size`::
(Optional, integer) Specifies the maximum number of {transforms} to obtain. The default value is `100`. (Optional, integer)
include::{docdir}/rest-api/common-parms.asciidoc[tag=size-transforms]
[[get-transform-response]] [[get-transform-response]]
==== {api-response-body-title} ==== {api-response-body-title}
`transforms`:: The API returns an array of {transform} resources, which are sorted by the `id`
(array) An array of {transform} resources, which are sorted by the `id` value in value in ascending order. For the full list of properties, see
ascending order. See <<transform-resource>>. <<put-transform-request-body,Create {transform} API>>.
`create_time`::
(string) The time the {transform} was created. For example, `1576094542936`.
This property is informational; you cannot change its value.
`version`::
(string) The version of {es} that existed on the node when the {transform} was
created.
[[get-transform-response-codes]] [[get-transform-response-codes]]
==== {api-response-codes-title} ==== {api-response-codes-title}
@ -149,7 +146,9 @@ The API returns the following results:
} }
} }
}, },
"description" : "Maximum priced ecommerce data by customer_id in Asia" "description" : "Maximum priced ecommerce data by customer_id in Asia",
"version" : "7.5.0",
"create_time" : 1576094542936
} }
] ]
} }

View File

@ -1,11 +1,11 @@
[role="xpack"] [role="xpack"]
[testenv="basic"] [testenv="basic"]
[[preview-transform]] [[preview-transform]]
=== Preview {transforms} API === Preview {transform} API
[subs="attributes"] [subs="attributes"]
++++ ++++
<titleabbrev>Preview {transforms}</titleabbrev> <titleabbrev>Preview {transform}</titleabbrev>
++++ ++++
Previews a {transform}. Previews a {transform}.
@ -37,24 +37,71 @@ on all the current data in the source index.
[[preview-transform-request-body]] [[preview-transform-request-body]]
==== {api-request-body-title} ==== {api-request-body-title}
`source`::
(Required, object) The source configuration, which has the following
properties:
`index`:::
(Required, string or array) The _source indices_ for the
{transform}. It can be a single index, an index pattern (for
example, `"myindex*"`), or an array of indices (for example,
`["index1", "index2"]`).
`query`::: `description`::
(Optional, object) A query clause that retrieves a subset of data from the (Optional, string) Free text description of the {transform}.
source index. See <<query-dsl>>.
`dest`::
(Optional, object)
include::{docdir}/rest-api/common-parms.asciidoc[tag=dest]
`dest`.`index`:::
(Optional, string)
include::{docdir}/rest-api/common-parms.asciidoc[tag=dest-index]
`dest`.`pipeline`:::
(Optional, string)
include::{docdir}/rest-api/common-parms.asciidoc[tag=dest-pipeline]
`frequency`::
(Optional, <<time-units, time units>>)
include::{docdir}/rest-api/common-parms.asciidoc[tag=frequency]
`pivot`:: `pivot`::
(Required, object) Defines the pivot function `group by` fields and the (Required, object)
aggregation to reduce the data. See <<transform-pivot>>. include::{docdir}/rest-api/common-parms.asciidoc[tag=pivot]
`pivot`.`aggregations` or `aggs`:::
(Required, object)
include::{docdir}/rest-api/common-parms.asciidoc[tag=pivot-aggs]
`pivot`.`group_by`:::
(Required, object)
include::{docdir}/rest-api/common-parms.asciidoc[tag=pivot-group-by]
`pivot`.`max_page_search_size`:::
(Optional, integer)
include::{docdir}/rest-api/common-parms.asciidoc[tag=pivot-max-page-search-size]
`source`::
(Required, object)
include::{docdir}/rest-api/common-parms.asciidoc[tag=source-transforms]
`source`.`index`:::
(Required, string or array)
include::{docdir}/rest-api/common-parms.asciidoc[tag=source-index-transforms]
`source`.`query`:::
(Optional, object)
include::{docdir}/rest-api/common-parms.asciidoc[tag=source-query-transforms]
`sync`::
(Optional, object)
include::{docdir}/rest-api/common-parms.asciidoc[tag=sync]
`sync`.`time`:::
(Optional, object)
include::{docdir}/rest-api/common-parms.asciidoc[tag=sync-time]
`sync`.`time`.`delay`::::
(Optional, <<time-units, time units>>)
include::{docdir}/rest-api/common-parms.asciidoc[tag=sync-time-delay]
`sync`.`time`.`field`::::
(Optional, string)
include::{docdir}/rest-api/common-parms.asciidoc[tag=sync-time-field]
[[preview-transform-response]] [[preview-transform-response]]
==== {api-response-body-title} ==== {api-response-body-title}

View File

@ -1,11 +1,11 @@
[role="xpack"] [role="xpack"]
[testenv="basic"] [testenv="basic"]
[[put-transform]] [[put-transform]]
=== Create {transforms} API === Create {transform} API
[subs="attributes"] [subs="attributes"]
++++ ++++
<titleabbrev>Create {transforms}</titleabbrev> <titleabbrev>Create {transform}</titleabbrev>
++++ ++++
Instantiates a {transform}. Instantiates a {transform}.
@ -63,9 +63,8 @@ IMPORTANT: You must use {kib} or this API to create a {transform}.
==== {api-path-parms-title} ==== {api-path-parms-title}
`<transform_id>`:: `<transform_id>`::
(Required, string) Identifier for the {transform}. This identifier (Required, string)
can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and include::{docdir}/rest-api/common-parms.asciidoc[tag=transform-id]
underscores. It must start and end with alphanumeric characters.
[[put-transform-query-parms]] [[put-transform-query-parms]]
==== {api-query-parms-title} ==== {api-query-parms-title}
@ -82,48 +81,64 @@ IMPORTANT: You must use {kib} or this API to create a {transform}.
(Optional, string) Free text description of the {transform}. (Optional, string) Free text description of the {transform}.
`dest`:: `dest`::
(Required, object) Required. The destination configuration, which has the (Required, object)
following properties: include::{docdir}/rest-api/common-parms.asciidoc[tag=dest]
`index`::: `dest`.`index`:::
(Required, string) The _destination index_ for the {transform}. (Required, string)
include::{docdir}/rest-api/common-parms.asciidoc[tag=dest-index]
`pipeline`::: `dest`.`pipeline`:::
(Optional, string) The unique identifier for a <<pipeline,pipeline>>. (Optional, string)
include::{docdir}/rest-api/common-parms.asciidoc[tag=dest-pipeline]
`frequency`:: `frequency`::
(Optional, <<time-units, time units>>) The interval between checks for changes in the source (Optional, <<time-units, time units>>)
indices when the {transform} is running continuously. Also determines include::{docdir}/rest-api/common-parms.asciidoc[tag=frequency]
the retry interval in the event of transient failures while the {transform} is
searching or indexing. The minimum value is `1s` and the maximum is `1h`. The
default value is `1m`.
`pivot`:: `pivot`::
(Required, object) Defines the pivot function `group by` fields and the aggregation to (Required, object)
reduce the data. See <<transform-pivot>>. include::{docdir}/rest-api/common-parms.asciidoc[tag=pivot]
`pivot`.`aggregations` or `aggs`:::
(Required, object)
include::{docdir}/rest-api/common-parms.asciidoc[tag=pivot-aggs]
`pivot`.`group_by`:::
(Required, object)
include::{docdir}/rest-api/common-parms.asciidoc[tag=pivot-group-by]
`pivot`.`max_page_search_size`:::
(Optional, integer)
include::{docdir}/rest-api/common-parms.asciidoc[tag=pivot-max-page-search-size]
`source`:: `source`::
(Required, object) The source configuration, which has the following (Required, object)
properties: include::{docdir}/rest-api/common-parms.asciidoc[tag=source-transforms]
`index`::: `source`.`index`:::
(Required, string or array) The _source indices_ for the (Required, string or array)
{transform}. It can be a single index, an index pattern (for include::{docdir}/rest-api/common-parms.asciidoc[tag=source-index-transforms]
example, `"myindex*"`), or an array of indices (for example,
`["index1", "index2"]`). `source`.`query`:::
(Optional, object)
`query`::: include::{docdir}/rest-api/common-parms.asciidoc[tag=source-query-transforms]
(Optional, object) A query clause that retrieves a subset of data from the
source index. See <<query-dsl>>.
`sync`:: `sync`::
(Optional, object) Defines the properties required to run continuously. (Optional, object)
`time`::: include::{docdir}/rest-api/common-parms.asciidoc[tag=sync]
(Required, object) Specifies that the {transform} uses a time
field to synchronize the source and destination indices. `sync`.`time`:::
`field`:::: (Required, object)
(Required, string) The date field that is used to identify new documents include::{docdir}/rest-api/common-parms.asciidoc[tag=sync-time]
in the source.
`sync`.`time`.`delay`::::
(Optional, <<time-units, time units>>)
include::{docdir}/rest-api/common-parms.asciidoc[tag=sync-time-delay]
`sync`.`time`.`field`::::
(Required, string)
include::{docdir}/rest-api/common-parms.asciidoc[tag=sync-time-field]
+ +
-- --
TIP: In general, its a good idea to use a field that contains the TIP: In general, its a good idea to use a field that contains the
@ -132,9 +147,6 @@ you might need to set the `delay` such that it accounts for data transmission
delays. delays.
-- --
`delay`::::
(Optional, <<time-units, time units>>) The time delay between the current time and the
latest input data time. The default value is `60s`.
[[put-transform-example]] [[put-transform-example]]
==== {api-examples-title} ==== {api-examples-title}

View File

@ -1,11 +1,11 @@
[role="xpack"] [role="xpack"]
[testenv="basic"] [testenv="basic"]
[[start-transform]] [[start-transform]]
=== Start {transforms} API === Start {transform} API
[subs="attributes"] [subs="attributes"]
++++ ++++
<titleabbrev>Start {transforms}</titleabbrev> <titleabbrev>Start {transform}</titleabbrev>
++++ ++++
Starts one or more {transforms}. Starts one or more {transforms}.
@ -52,9 +52,8 @@ required privileges on the source and destination indices, the
==== {api-path-parms-title} ==== {api-path-parms-title}
`<transform_id>`:: `<transform_id>`::
(Required, string) Identifier for the {transform}. This identifier (Required, string)
can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and include::{docdir}/rest-api/common-parms.asciidoc[tag=transform-id]
underscores. It must start and end with alphanumeric characters.
[[start-transform-example]] [[start-transform-example]]
==== {api-examples-title} ==== {api-examples-title}

View File

@ -45,32 +45,15 @@ All {transforms} can be stopped by using `_all` or `*` as the
==== {api-path-parms-title} ==== {api-path-parms-title}
`<transform_id>`:: `<transform_id>`::
(Required, string) Identifier for the {transform}. This identifier (Required, string)
can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and include::{docdir}/rest-api/common-parms.asciidoc[tag=transform-id]
underscores. It must start and end with alphanumeric characters.
[[stop-transform-query-parms]] [[stop-transform-query-parms]]
==== {api-query-parms-title} ==== {api-query-parms-title}
`allow_no_match`:: `allow_no_match`::
(Optional, boolean) Specifies what to do when the request: (Optional, boolean)
+ include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-match-transforms2]
--
* Contains wildcard expressions and there are no {transforms} that match.
* Contains the `_all` string or no identifiers and there are no matches.
* Contains wildcard expressions and there are only partial matches.
The default value is `true`, which returns a successful acknowledgement message
when there are no matches. When there are only partial matches, the API stops
the appropriate {transforms}. For example, if the request contains
`test-id1*,test-id2*` as the identifiers and there are no {transforms}
that match `test-id2*`, the API nonetheless stops the {transforms}
that match `test-id1*`.
If this parameter is `false`, the request returns a `404` status code when there
are no matches or only partial matches.
--
`force`:: `force`::
(Optional, boolean) Set to `true` to stop a failed {transform} or to (Optional, boolean) Set to `true` to stop a failed {transform} or to
@ -92,7 +75,7 @@ are no matches or only partial matches.
`wait_for_checkpoint`:: `wait_for_checkpoint`::
(Optional, boolean) If set to `true`, the transform will not completely stop (Optional, boolean) If set to `true`, the transform will not completely stop
until the current checkpoint is completed. If set to `false`, the transform until the current checkpoint is completed. If set to `false`, the {transform}
stops as soon as possible. Defaults to `false`. stops as soon as possible. Defaults to `false`.
[[stop-transform-response-codes]] [[stop-transform-response-codes]]

View File

@ -1,127 +0,0 @@
[role="xpack"]
[testenv="basic"]
[[transform-resource]]
=== {transform-cap} resources
{transform-cap} resources relate to the <<transform-apis>>.
For more information, see <<transforms>>.
[discrete]
[[transform-properties]]
==== {api-definitions-title}
`description`::
(string) A description of the {transform}.
`dest`::
(object) The destination for the {transform}. See
<<transform-dest>>.
`frequency`::
(time units) The interval between checks for changes in the source indices
when the {transform} is running continuously. Also determines the
retry interval in the event of transient failures while the {transform} is
searching or indexing. The minimum value is `1s` and the maximum is `1h`. The
default value is `1m`.
`id`::
(string) A unique identifier for the {transform}.
`pivot`::
(object) The method for transforming the data. See
<<transform-pivot>>.
`source`::
(object) The source of the data for the {transform}. See
<<transform-source>>.
[[transform-dest]]
==== Dest objects
{transform-cap} resources contain `dest` objects. For example, when
you create a {transform}, you must define its destination.
[discrete]
[[transform-dest-properties]]
===== {api-definitions-title}
`index`::
(string) The _destination index_ for the {transform}.
`pipeline`::
(string) The unique identifier for a <<pipeline,pipeline>>.
[[transform-source]]
==== Source objects
{transform-cap} resources contain `source` objects. For example, when
you create a {transform}, you must define its source.
[discrete]
[[transform-source-properties]]
===== {api-definitions-title}
`index`::
(string or array) The _source indices_ for the {transform}. It can
be a single index, an index pattern (for example, `"myindex*"`), or an array
of indices (for example, `["index1", "index2"]`).
`query`::
(object) A query clause that retrieves a subset of data from the source index.
See <<query-dsl>>.
[[transform-pivot]]
==== Pivot objects
{transform-cap} resources contain `pivot` objects, which define the
pivot function `group by` fields and the aggregation to reduce the data.
[discrete]
[[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-geobounds-aggregation.html[Geo Bounds]
* {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]
* {ref}/search-aggregations-pipeline-bucket-selector-aggregation.html[Bucket Selector]
IMPORTANT: {transforms-cap} support a subset of the functionality in
composite aggregations. See <<transform-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]
--
`max_page_search_size`::
(integer) Defines the initial page size to use for the composite aggregation
for each checkpoint. If circuit breaker exceptions occur, the page size is
dynamically adjusted to a lower value. The minimum value is `10` and the
maximum is `10,000`. The default value is `500`.
[[transform-example]]
==== {api-examples-title}
See the
<<put-transform-example,create {transforms} API examples>>.

View File

@ -1,14 +1,14 @@
[role="xpack"] [role="xpack"]
[testenv="basic"] [testenv="basic"]
[[update-transform]] [[update-transform]]
=== Update {transforms} API === Update {transform} API
[subs="attributes"] [subs="attributes"]
++++ ++++
<titleabbrev>Update {transforms}</titleabbrev> <titleabbrev>Update {transform}</titleabbrev>
++++ ++++
Updates an existing {transform}. Updates certain properties of a {transform}.
beta[] beta[]
@ -30,29 +30,36 @@ privileges on the destination index. For more information, see
[[update-transform-desc]] [[update-transform-desc]]
==== {api-description-title} ==== {api-description-title}
This API updates an existing {transform}. All settings except description do not This API updates an existing {transform}. The list of properties that you can
take effect until after the {transform} starts the next checkpoint. This is update is a subset of the list that you can define when you create a {transform}.
so there is consistency with the pivoted data in each checkpoint.
IMPORTANT: When {es} {security-features} are enabled, your {transform} When the {transform} is updated, a series of validations occur to ensure its
remembers which roles the user who updated it had at the time of update and success. You can use the `defer_validation` parameter to skip these checks.
runs with those privileges.
IMPORTANT: You must use {kib} or this API to update a {transform}. All updated properties except description do not take effect until after the
Do not update a {transform} directly via {transform} starts the next checkpoint. This is so there is consistency with the
`.transform-internal*` indices using the Elasticsearch index API. pivoted data in each checkpoint.
If {es} {security-features} are enabled, do not give users any
privileges on `.transform-internal*` indices. If you used transforms [IMPORTANT]
prior 7.5, also do not give users any privileges on ====
`.data-frame-internal*` indices.
* When {es} {security-features} are enabled, your {transform} remembers which
roles the user who updated it had at the time of update and runs with those
privileges.
* You must use {kib} or this API to update a {transform}. Do not update a
{transform} directly via `.transform-internal*` indices using the {es} index API.
If {es} {security-features} are enabled, do not give users any privileges on
`.transform-internal*` indices. If you used {transforms} prior 7.5, also do not
give users any privileges on `.data-frame-internal*` indices.
====
[[update-transform-path-parms]] [[update-transform-path-parms]]
==== {api-path-parms-title} ==== {api-path-parms-title}
`<transform_id>`:: `<transform_id>`::
(Required, string) Identifier for the {transform}. This identifier (Required, string)
can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and include::{docdir}/rest-api/common-parms.asciidoc[tag=transform-id]
underscores. It must start and end with alphanumeric characters.
[[update-transform-query-parms]] [[update-transform-query-parms]]
==== {api-query-parms-title} ==== {api-query-parms-title}
@ -69,44 +76,48 @@ IMPORTANT: You must use {kib} or this API to update a {transform}.
(Optional, string) Free text description of the {transform}. (Optional, string) Free text description of the {transform}.
`dest`:: `dest`::
(Optional, object) The destination configuration, which has the (Optional, object)
following properties: include::{docdir}/rest-api/common-parms.asciidoc[tag=dest]
`index`::: `dest`.`index`:::
(Required, string) The _destination index_ for the {transform}. (Required, string)
include::{docdir}/rest-api/common-parms.asciidoc[tag=dest-index]
`pipeline`::: `dest`.`pipeline`:::
(Optional, string) The unique identifier for a <<pipeline,pipeline>>. (Optional, string)
include::{docdir}/rest-api/common-parms.asciidoc[tag=dest-pipeline]
`frequency`:: `frequency`::
(Optional, <<time-units, time units>>) The interval between checks for changes (Optional, <<time-units, time units>>)
in the source indices when the {transform} is running continuously. include::{docdir}/rest-api/common-parms.asciidoc[tag=frequency]
Also determines the retry interval in the event of transient failures while
the {transform} is searching or indexing. The minimum value is `1s`
and the maximum is `1h`. The default value is `1m`.
`source`:: `source`::
(Optional, object) The source configuration, which has the following (Optional, object)
properties: include::{docdir}/rest-api/common-parms.asciidoc[tag=source-transforms]
`index`::: `source`.`index`:::
(Required, string or array) The _source indices_ for the (Required, string or array)
{transform}. It can be a single index, an index pattern (for include::{docdir}/rest-api/common-parms.asciidoc[tag=source-index-transforms]
example, `"myindex*"`), or an array of indices (for example,
`["index1", "index2"]`).
`query`::: `source`.`query`:::
(Optional, object) A query clause that retrieves a subset of data from the (Optional, object)
source index. See <<query-dsl>>. include::{docdir}/rest-api/common-parms.asciidoc[tag=source-query-transforms]
`sync`:: `sync`::
(Optional, object) Defines the properties required to run continuously. (Optional, object)
`time`::: include::{docdir}/rest-api/common-parms.asciidoc[tag=sync]
(Required, object) Specifies that the {transform} uses a time
field to synchronize the source and destination indices. `sync`.`time`:::
`field`:::: (Required, object)
(Required, string) The date field that is used to identify new documents include::{docdir}/rest-api/common-parms.asciidoc[tag=sync-time]
in the source.
`sync`.`time`.`delay`::::
(Optional, <<time-units, time units>>)
include::{docdir}/rest-api/common-parms.asciidoc[tag=sync-time-delay]
`sync`.`time`.`field`::::
(Required, string)
include::{docdir}/rest-api/common-parms.asciidoc[tag=sync-time-field]
+ +
-- --
TIP: In general, its a good idea to use a field that contains the TIP: In general, its a good idea to use a field that contains the
@ -115,9 +126,6 @@ you might need to set the `delay` such that it accounts for data transmission
delays. delays.
-- --
`delay`::::
(Optional, <<time-units, time units>>) The time delay between the current
time and the latest input data time. The default value is `60s`.
[[update-transform-example]] [[update-transform-example]]
==== {api-examples-title} ==== {api-examples-title}
@ -196,9 +204,9 @@ When the {transform} is updated, you receive the updated configuration:
"delay": "120s" "delay": "120s"
} }
}, },
"version": "7.4.0", "version": "7.5.0",
"create_time": 1518808660505 "create_time": 1518808660505
} }
---- ----
// TESTRESPONSE[s/"version": "7.4.0"/"version": $body.version/] // TESTRESPONSE[s/"version": "7.5.0"/"version": $body.version/]
// TESTRESPONSE[s/"create_time": 1518808660505/"create_time": $body.create_time/] // TESTRESPONSE[s/"create_time": 1518808660505/"create_time": $body.create_time/]