start-transform.asciidoc 2.5 KB

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