Update a transform Added in 7.2.0
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.
Path parameters
-
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
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
Body Required
-
dest object
Additional properties are allowed.
-
description string
Free text description of the transform.
-
frequency string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
_meta object
-
source object
Additional properties are allowed.
-
settings object
Additional properties are allowed.
-
sync object
Additional properties are allowed.
retention_policy object | string | null
Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the destination index.
curl \
-X POST http://api.example.com/_transform/{transform_id}/_update \
-H "Content-Type: application/json" \
-d '{"dest":{"index":"kibana_sample_data_ecommerce_transform1","pipeline":"add_timestamp_pipeline"},"sync":{"time":{"delay":"60s","field":"order_date"}},"pivot":{"group_by":{"customer_id":{"terms":{"field":"customer_id","missing_bucket":true}}},"aggregations":{"max_price":{"max":{"field":"taxful_total_price"}}}},"source":{"index":"kibana_sample_data_ecommerce","query":{"term":{"geoip.continent_name":{"value":"Asia"}}}},"frequency":"5m","description":"Maximum priced ecommerce data by customer_id in Asia","retention_policy":{"time":{"field":"order_date","max_age":"30d"}}}'
{
"dest": {
"index": "kibana_sample_data_ecommerce_transform1",
"pipeline": "add_timestamp_pipeline"
},
"sync": {
"time": {
"delay": "60s",
"field": "order_date"
}
},
"pivot": {
"group_by": {
"customer_id": {
"terms": {
"field": "customer_id",
"missing_bucket": true
}
}
},
"aggregations": {
"max_price": {
"max": {
"field": "taxful_total_price"
}
}
}
},
"source": {
"index": "kibana_sample_data_ecommerce",
"query": {
"term": {
"geoip.continent_name": {
"value": "Asia"
}
}
}
},
"frequency": "5m",
"description": "Maximum priced ecommerce data by customer_id in Asia",
"retention_policy": {
"time": {
"field": "order_date",
"max_age": "30d"
}
}
}
{
"id": "simple-kibana-ecomm-pivot",
"dest": {
"index": "kibana_sample_data_ecommerce_transform_v2",
"pipeline": "add_timestamp_pipeline"
},
"sync": {
"time": {
"delay": "120s",
"field": "order_date"
}
},
"pivot": {
"group_by": {
"customer_id": {
"terms": {
"field": "customer_id",
"missing_bucket": true
}
}
},
"aggregations": {
"max_price": {
"max": {
"field": "taxful_total_price"
}
}
}
},
"source": {
"index": [
"kibana_sample_data_ecommerce"
],
"query": {
"term": {
"geoip.continent_name": {
"value": "Asia"
}
}
}
},
"version": "10.0.0",
"settings": {},
"frequency": "15m",
"create_time": 1712951576767,
"description": "Maximum priced ecommerce data by customer_id in Asia",
"authorization": {
"roles": [
"superuser"
]
},
"retention_policy": {
"time": {
"field": "order_date",
"max_age": "30d"
}
}
}