Closed
Description
Elasticsearch/Kibana Version 7.5.2 running in on-prem ECE
While working with the _transaform API I noticed that documents were only getting grouped if all fields in the group by section had a value. Some reading in the composite aggregation documentation I see that this can be fixed by setting missing_bucket
to true. The terms aggregation also has a missing
parameter that can be set but that appears to no be supported either #48243
Any idea how we can get around this?
POST _transform/_preview
{
"source": {
"index": [
"visanet-transaction*"
],
"query": {
"match_all": {}
}
},
"dest": {
"index": "dest"
},
"pivot": {
"group_by": {
"transactionTime": {
"date_histogram": {
"field": "transactionTime",
"fixed_interval": "1h"
}
},
"vipID": {
"terms": {
"field": "vipID",
"missing_bucket": true
}
}
},
"aggregations": {
"transactionID.value_count": {
"value_count": {
"field": "transactionID"
}
},
"usdAmount.sum": {
"sum": {
"field": "usdAmount"
}
}
}
}
}
Error:
{
"error": {
"root_cause": [
{
"type": "x_content_parse_exception",
"reason": "[1:20] [data_frame_terms_group] unknown field [missing_bucket], parser not found"
}
],
"type": "x_content_parse_exception",
"reason": "[1:167] [data_frame_transform_config] failed to parse field [pivot]",
"caused_by": {
"type": "x_content_parse_exception",
"reason": "[1:167] [data_frame_transform_pivot] failed to parse field [group_by]",
"caused_by": {
"type": "x_content_parse_exception",
"reason": "[1:20] [data_frame_terms_group] unknown field [missing_bucket], parser not found"
}
}
},
"status": 400
}