In a transform under the section of "pivot": and "group_by": I would like to default a value if keyName does not exist. Example:
<if query_parameters.partnerId does not exists:
partnerId=null
else:
partnerId=query_parameters.partnerId/>
I tried to do the following:
"partnerId": {
"terms": {
"field": "query_parameters.partnerId",
"missing": "NULL"
}
But it fails with this error when I provision the transform via API. If I remove "missing": "NULL" all works well but I need to set the groupBy keyName to null:
{
"error" : {
"root_cause" : [
{
"type" : "x_content_parse_exception",
"reason" : "[1:124] [data_frame_terms_group] unknown field [missing]"
}
],
"type" : "x_content_parse_exception",
"reason" : "[135:5] [data_frame_transform_config] failed to parse field [pivot]",
"caused_by" : {
"type" : "x_content_parse_exception",
"reason" : "[135:5] [data_frame_transform_pivot] failed to parse field [group_by]",
"caused_by" : {
"type" : "x_content_parse_exception",
"reason" : "[1:124] [data_frame_terms_group] unknown field [missing]"
}
}
},
"status" : 400
}
How can I make it work when a keyName does not exists?
Thanks,
Lp