2019-03-21 12:38:00 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="basic"]
|
2019-09-20 18:57:43 -04:00
|
|
|
[[start-transform]]
|
2019-12-17 12:01:31 -05:00
|
|
|
=== Start {transform} API
|
2019-04-30 13:46:13 -04:00
|
|
|
|
|
|
|
[subs="attributes"]
|
2019-03-21 12:38:00 -04:00
|
|
|
++++
|
2019-12-17 12:01:31 -05:00
|
|
|
<titleabbrev>Start {transform}</titleabbrev>
|
2019-03-21 12:38:00 -04:00
|
|
|
++++
|
|
|
|
|
2019-09-16 11:28:19 -04:00
|
|
|
Starts one or more {transforms}.
|
2019-03-21 12:38:00 -04:00
|
|
|
|
2019-07-10 17:39:38 -04:00
|
|
|
beta[]
|
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
[[start-transform-request]]
|
2019-06-26 16:46:21 -04:00
|
|
|
==== {api-request-title}
|
2019-03-21 12:38:00 -04:00
|
|
|
|
2019-10-08 02:59:01 -04:00
|
|
|
`POST _transform/<transform_id>/_start`
|
2019-03-21 12:38:00 -04:00
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
[[start-transform-prereqs]]
|
2019-06-26 16:46:21 -04:00
|
|
|
==== {api-prereq-title}
|
2019-06-12 13:13:04 -04:00
|
|
|
|
2019-10-17 04:22:38 -04:00
|
|
|
* If the {es} {security-features} are enabled, you must have `manage_transform`
|
|
|
|
cluster privileges to use this API. You must also have `view_index_metadata`
|
|
|
|
privileges on the source index for the {transform}. For more information, see
|
|
|
|
<<security-privileges>> and <<built-in-roles>>.
|
2019-03-21 12:38:00 -04:00
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
[[start-transform-desc]]
|
2019-07-22 18:29:59 -04:00
|
|
|
==== {api-description-title}
|
|
|
|
|
2019-09-16 11:28:19 -04:00
|
|
|
When you start a {transform}, it creates the destination index if it
|
2019-07-24 14:09:06 -04:00
|
|
|
does not already exist. The `number_of_shards` is set to `1` and the
|
|
|
|
`auto_expand_replicas` is set to `0-1`.
|
|
|
|
|
2019-09-16 11:28:19 -04:00
|
|
|
The {transform} deduces the mapping definitions from the source indices. For
|
2019-07-24 14:09:06 -04:00
|
|
|
scripted fields, it uses <<dynamic-mapping,dynamic mappings>>. If a field in the
|
|
|
|
destination index is created by `scripted_metric` or `bucket_script`
|
2019-09-16 11:28:19 -04:00
|
|
|
aggregations, the {transform} uses dynamic mappings unless a template exists or
|
2019-07-24 14:09:06 -04:00
|
|
|
the destination index already exists. Mapping definitions in the destination
|
|
|
|
index take precedence over dynamic mappings and templates.
|
|
|
|
|
2019-09-16 11:28:19 -04:00
|
|
|
When the {transform} starts, a series of validations occur to ensure
|
2019-07-24 14:09:06 -04:00
|
|
|
its success. If you deferred validation when you created the
|
2019-09-16 11:28:19 -04:00
|
|
|
{transform}, they occur when you start the {transform}--with the
|
2019-07-25 18:03:57 -04:00
|
|
|
exception of privilege checks. When {es} {security-features} are enabled, the
|
2019-09-16 11:28:19 -04:00
|
|
|
{transform} remembers which roles the user that created it had at the
|
2019-07-25 18:03:57 -04:00
|
|
|
time of creation and uses those same roles. If those roles do not have the
|
|
|
|
required privileges on the source and destination indices, the
|
2019-09-16 11:28:19 -04:00
|
|
|
{transform} fails when it attempts unauthorized operations.
|
2019-07-22 18:29:59 -04:00
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
[[start-transform-path-parms]]
|
2019-06-26 16:46:21 -04:00
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
`<transform_id>`::
|
2019-12-17 12:01:31 -05:00
|
|
|
(Required, string)
|
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=transform-id]
|
2019-03-21 12:38:00 -04:00
|
|
|
|
2019-09-20 18:57:43 -04:00
|
|
|
[[start-transform-example]]
|
2019-06-27 12:42:47 -04:00
|
|
|
==== {api-examples-title}
|
2019-03-21 12:38:00 -04:00
|
|
|
|
2019-09-09 13:38:14 -04:00
|
|
|
[source,console]
|
2019-03-21 12:38:00 -04:00
|
|
|
--------------------------------------------------
|
2019-10-08 02:59:01 -04:00
|
|
|
POST _transform/ecommerce_transform/_start
|
2019-03-21 12:38:00 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[skip:set up kibana samples]
|
|
|
|
|
2019-09-16 11:28:19 -04:00
|
|
|
When the {transform} starts, you receive the following results:
|
2019-09-06 09:22:08 -04:00
|
|
|
|
|
|
|
[source,console-result]
|
2019-03-21 12:38:00 -04:00
|
|
|
----
|
|
|
|
{
|
2019-05-29 05:13:37 -04:00
|
|
|
"acknowledged" : true
|
2019-03-21 12:38:00 -04:00
|
|
|
}
|
|
|
|
----
|