Update a transform

Auth

Updates certain properties of a transform.

All updated properties except description do not take effect until after the transform starts the next checkpoint, thus there is data consistency in each checkpoint. To use this API, you must have read and view_index_metadata privileges for the source indices. You must also have index and read privileges for the destination index. When Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the time of update and runs with those privileges.

Required privileges

Index privileges read index view_index_metadata
Cluster privileges manage_transform

Path parameters

transform_id string required

Identifier for the transform.

Query parameters

defer_validation boolean

When true, deferrable validations are not run. This behavior may be desired if the source index does not exist until after the transform is created.

timeout string · default: 30s

Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

Request body

description string

Free text description of the transform.

frequency string · default: 1m

The interval between checks for changes in the source indices when the transform is running continuously. Also determines the retry interval in the event of transient failures while the transform is searching or indexing. The minimum value is 1s and the maximum is 1h.

_meta object

Defines optional transform metadata.

retention_policy union oneOf nullable

Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the destination index.

One of:

Response

application/json
create_time number required
description string
dest object required
index string

The destination index for the transform. The mappings of the destination index are deduced based on the source fields when possible. If alternate mappings are required, use the create index API prior to starting the transform.

pipeline string

The unique identifier for an ingest pipeline.

frequency string
id string required
settings object required
align_checkpoints boolean · default: true

Specifies whether the transform checkpoint ranges should be optimized for performance. Such optimization can align checkpoint ranges with the date histogram interval when date histogram is specified as a group source in the transform config. As a result, less document updates in the destination index will be performed thus improving overall performance.

dates_as_epoch_millis boolean · default: false

Defines if dates in the output should be written as ISO formatted string or as millis since epoch. epoch_millis was the default for transforms created before version 7.11. For compatible output set this value to true.

deduce_mappings boolean · default: true

Specifies whether the transform should deduce the destination index mappings from the transform configuration.

docs_per_second number

Specifies a limit on the number of input documents per second. This setting throttles the transform by adding a wait time between search requests. The default value is null, which disables throttling.

max_page_search_size number

Defines the initial page size to use for the composite aggregation for each checkpoint. If circuit breaker exceptions occur, the page size is dynamically adjusted to a lower value. The minimum value is 10 and the maximum is 65,536. The default value is 500 for pivot transforms and 5000 for latest transforms.

use_point_in_time boolean · default: true

Specifies whether the transform checkpoint will use the Point In Time API while searching over the source index. In general, Point In Time is an optimization that will reduce pressure on the source index by reducing the amount of refreshes and merges, but it can be expensive if a large number of Point In Times are opened and closed for a given index. The benefits and impact depend on the data being searched, the ingest rate into the source index, and the amount of other consumers searching the same source index.

num_failure_retries number

Defines the number of retries on a recoverable failure before the transform task is marked as failed. The minimum value is 0 and the maximum is 100, where -1 indicates that the transform retries indefinitely. If unset, the cluster-level setting num_transform_failure_retries is used.

This setting cannot be specified when unattended is true, because unattended transforms always retry indefinitely.

unattended boolean · default: false

If true, the transform runs in unattended mode. In unattended mode, the transform retries indefinitely in case of an error which means the transform never fails. Setting the number of retries other than infinite fails in validation.

indexer_request_timeout union string nullable

The initial timeout for the requests the transform sends to nodes to retrieve checkpoint information. Each consecutive failure doubles the timeout, up to a maximum of 12h. The minimum value is 1ms and the maximum is 12h. Defaults to 30s.

source object required
index union oneOf required

The name of the data stream, index, or alias you are copying from. It accepts a comma-separated list to reindex from multiple sources.

One of: string[] or string
query {} Query

The documents to reindex, which is defined with Query DSL.

size number · default: 1000

The number of documents to index per batch. Use it when you are indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.

_source union oneOf · default: true

If true, reindex all source fields. Set it to a list to reindex select fields.

One of:
runtime_mappings object
version string required
_meta object