start-transform.asciidoc 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. [role="xpack"]
  2. [[start-transform]]
  3. = Start {transform} API
  4. [subs="attributes"]
  5. ++++
  6. <titleabbrev>Start {transform}</titleabbrev>
  7. ++++
  8. Starts one or more {transforms}.
  9. [[start-transform-request]]
  10. == {api-request-title}
  11. `POST _transform/<transform_id>/_start`
  12. [[start-transform-prereqs]]
  13. == {api-prereq-title}
  14. Requires the following privileges:
  15. * cluster: `manage_transform` (the `transform_admin` built-in role grants this
  16. privilege)
  17. * source indices: `read`, `view_index_metadata`.
  18. [[start-transform-desc]]
  19. == {api-description-title}
  20. When you start a {transform}, it creates the destination index if it does not
  21. already exist. The `number_of_shards` is set to `1` and the
  22. `auto_expand_replicas` is set to `0-1`.
  23. If it is a pivot {transform}, it deduces the mapping definitions for the
  24. destination index from the source indices and the transform aggregations. If
  25. fields in the destination index are derived from scripts (as in the case of
  26. `scripted_metric` or `bucket_script` aggregations), the {transform} uses
  27. <<dynamic-mapping,dynamic mappings>> unless an index template exists.
  28. If it is a latest {transform}, it does not deduce mapping definitions; it uses
  29. dynamic mappings.
  30. TIP: To use explicit mappings, create the destination index before you start the {transform}. Alternatively, you can create an index template, though it does not affect the
  31. deduced mappings in a pivot {transform}.
  32. When the {transform} starts, a series of validations occur to ensure
  33. its success. If you deferred validation when you created the
  34. {transform}, they occur when you start the {transform}--with the
  35. exception of privilege checks. When {es} {security-features} are enabled, the
  36. {transform} remembers which roles the user that created it had at the
  37. time of creation and uses those same roles. If those roles do not have the
  38. required privileges on the source and destination indices, the
  39. {transform} fails when it attempts unauthorized operations.
  40. [[start-transform-path-parms]]
  41. == {api-path-parms-title}
  42. `<transform_id>`::
  43. (Required, string)
  44. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=transform-id]
  45. [[start-transform-example]]
  46. == {api-examples-title}
  47. [source,console]
  48. --------------------------------------------------
  49. POST _transform/ecommerce_transform/_start
  50. --------------------------------------------------
  51. // TEST[skip:set up kibana samples]
  52. When the {transform} starts, you receive the following results:
  53. [source,console-result]
  54. ----
  55. {
  56. "acknowledged" : true
  57. }
  58. ----