start-transform.asciidoc 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. [role="xpack"]
  2. [[start-transform]]
  3. = Start {transform} API
  4. [subs="attributes"]
  5. ++++
  6. <titleabbrev>Start {transform}</titleabbrev>
  7. ++++
  8. Starts a {transform}.
  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. * destination index: `read`, `create_index`, `index`. If a `retention_policy` is configured, the `delete` privilege is
  19. also required.
  20. [[start-transform-desc]]
  21. == {api-description-title}
  22. When you start a {transform}, it creates the destination index if it does not
  23. already exist. The `number_of_shards` is set to `1` and the
  24. `auto_expand_replicas` is set to `0-1`.
  25. If it is a pivot {transform}, it deduces the mapping definitions for the
  26. destination index from the source indices and the transform aggregations. If
  27. fields in the destination index are derived from scripts (as in the case of
  28. `scripted_metric` or `bucket_script` aggregations), the {transform} uses
  29. <<dynamic-mapping,dynamic mappings>> unless an index template exists.
  30. If it is a latest {transform}, it does not deduce mapping definitions; it uses
  31. dynamic mappings.
  32. TIP: To use explicit mappings, create the destination index before you start the
  33. {transform}. Alternatively, you can create an index template, though it does not
  34. affect the deduced mappings in a pivot {transform}.
  35. When the {transform} starts, a series of validations occur to ensure
  36. its success. If you deferred validation when you created the
  37. {transform}, they occur when you start the {transform}--with the
  38. exception of privilege checks. When {es} {security-features} are enabled, the
  39. {transform} remembers which roles the user that created it had at the
  40. time of creation and uses those same roles. If those roles do not have the
  41. required privileges on the source and destination indices, the
  42. {transform} fails when it attempts unauthorized operations.
  43. [[start-transform-path-parms]]
  44. == {api-path-parms-title}
  45. `<transform_id>`::
  46. (Required, string)
  47. Identifier for the {transform}.
  48. [[start-transform-query-parms]]
  49. == {api-query-parms-title}
  50. `timeout`::
  51. (Optional, time)
  52. Period to wait for a response. If no response is received before the timeout
  53. expires, the request fails and returns an error. Defaults to `30s`.
  54. [[start-transform-example]]
  55. == {api-examples-title}
  56. [source,console]
  57. --------------------------------------------------
  58. POST _transform/ecommerce_transform/_start
  59. --------------------------------------------------
  60. // TEST[skip:set up kibana samples]
  61. When the {transform} starts, you receive the following results:
  62. [source,console-result]
  63. ----
  64. {
  65. "acknowledged" : true
  66. }
  67. ----