-
Notifications
You must be signed in to change notification settings - Fork 130
Description
Description
The example provided in the Transform Update API in the new version of the API docs. The example provided is:
POST _transform/simple-kibana-ecomm-pivot/_update
{
"source": {
"index": "kibana_sample_data_ecommerce",
"query": {
"term": {
"geoip.continent_name": {
"value": "Asia"
}
}
}
},
"pivot": {
"group_by": {
"customer_id": {
"terms": {
"field": "customer_id",
"missing_bucket": true
}
}
},
"aggregations": {
"max_price": {
"max": {
"field": "taxful_total_price"
}
}
}
},
"description": "Maximum priced ecommerce data by customer_id in Asia",
"dest": {
"index": "kibana_sample_data_ecommerce_transform1",
"pipeline": "add_timestamp_pipeline"
},
"frequency": "5m",
"sync": {
"time": {
"field": "order_date",
"delay": "60s"
}
},
"retention_policy": {
"time": {
"field": "order_date",
"max_age": "30d"
}
}
}
Running that example leads to the error below:
{
"error": {
"root_cause": [
{
"type": "x_content_parse_exception",
"reason": "[43:3][data_frame_transform_config_update] unknown field [pivot]"
}
],
"type": "x_content_parse_exception",
"reason": "[43:3][data_frame_transform_config_update] unknown field [pivot]"
},
"status": 400
}
The provided example is actually the output/response of the API call and not the payload.
Looking at the attributes/settings of the API, pivot
is indeed not a known/valid one.
A valid example is available in the previous version of the docs and should be:
POST _transform/simple-kibana-ecomm-pivot/_update
{
"source": {
"index": "kibana_sample_data_ecommerce",
"query": {
"term": {
"geoip.continent_name": {
"value": "Asia"
}
}
}
},
"description": "Maximum priced ecommerce data by customer_id in Asia",
"dest": {
"index": "kibana_sample_data_ecommerce_transform_v2",
"pipeline": "add_timestamp_pipeline"
},
"frequency": "15m",
"sync": {
"time": {
"field": "order_date",
"delay": "120s"
}
}
}
Can you please update the API doc page to provide the correct example?
Thanks
Resources
Transform update API - new version of the API with wrong example: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-update-transform
Transform update API - old version of the API with correct example: https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-transform.html
Which documentation set does this change impact?
Elastic On-Prem and Cloud (all)
Feature differences
N/A
What release is this request related to?
N/A
Serverless release
N/A
Collaboration model
The documentation team
Point of contact.
Main contact: @
Stakeholders: