start-transform.asciidoc 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. [[start-transform-desc]]
  18. == {api-description-title}
  19. When you start a {transform}, it creates the destination index if it does not
  20. already exist. The `number_of_shards` is set to `1` and the
  21. `auto_expand_replicas` is set to `0-1`.
  22. If it is a pivot {transform}, it deduces the mapping definitions for the
  23. destination index from the source indices and the transform aggregations. If
  24. fields in the destination index are derived from scripts (as in the case of
  25. `scripted_metric` or `bucket_script` aggregations), the {transform} uses
  26. <<dynamic-mapping,dynamic mappings>> unless an index template exists.
  27. If it is a latest {transform}, it does not deduce mapping definitions; it uses
  28. dynamic mappings.
  29. TIP: To use explicit mappings, create the destination index before you start the
  30. {transform}. Alternatively, you can create an index template, though it does not
  31. affect the 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. Identifier for the {transform}.
  45. [[start-transform-query-parms]]
  46. == {api-query-parms-title}
  47. `timeout`::
  48. (Optional, time)
  49. Period to wait for a response. If no response is received before the timeout
  50. expires, the request fails and returns an error. Defaults to `30s`.
  51. [[start-transform-example]]
  52. == {api-examples-title}
  53. [source,console]
  54. --------------------------------------------------
  55. POST _transform/ecommerce_transform/_start
  56. --------------------------------------------------
  57. // TEST[skip:set up kibana samples]
  58. When the {transform} starts, you receive the following results:
  59. [source,console-result]
  60. ----
  61. {
  62. "acknowledged" : true
  63. }
  64. ----