New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] Changes group-by and agg names. #36686
[ML] Changes group-by and agg names. #36686
Conversation
Pinging @elastic/ml-ui |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ⚡️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
field: fieldName, | ||
interval: '1m', | ||
}; | ||
} | ||
} | ||
|
||
const illegalEsAggNameChars = /[[\]>]/g; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would have thought there are a lot more illegal characters for an aggregation name, is there something significant about these ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was surprised too. Originally it was [a-zA-Z0-9\\-_]
, here's the reference to the elasticsearch PR that changed this: elastic/elasticsearch#6708
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and LGTM.
Don't suspect it's related to this PR, but the data frame I created when testing this out is stuck at 99%
elasticsearch.log doesn't show any errors:
[2019-05-21T09:55:59,904][INFO ][o.e.x.d.t.DataFrameTransformPersistentTasksExecutor] [DESKTOP-RQG9008] Successfully completed and scheduled task in node operation
[2019-05-21T09:56:01,880][WARN ][o.e.x.c.i.AsyncTwoPhaseIndexer] [DESKTOP-RQG9008] Schedule was triggered for job [nginx_bytes_df], but prior indexer is still running (with state [INDEXING]
[2019-05-21T09:56:01,947][INFO ][o.e.x.d.t.DataFrameTransformTask] [DESKTOP-RQG9008] Finished indexing for data frame transform [nginx_bytes_df] checkpoint [1]
So far the groupby/agg name shown in the dropdowns and the name used for the ES config agg name has been the same. This PR changes the behaviour to the following: - group_by aggregation names will be left as original e.g. clientip, timestamp - agg functions will be added to the end as a nested object e.g. doc.bytes.sent.sum and doc.bytes.sent.avg and duration.max - the drop down display labels in the pickers in the wizard will continue to use the sql-like notation e.g. date_histogram(timestamp), terms(clientip), sum(doc.bytes.sent), max(duration) - when auto-generating aggregation names, unsupported characters ([]>) will be removed.
So far the groupby/agg name shown in the dropdowns and the name used for the ES config agg name has been the same. This PR changes the behaviour to the following: - group_by aggregation names will be left as original e.g. clientip, timestamp - agg functions will be added to the end as a nested object e.g. doc.bytes.sent.sum and doc.bytes.sent.avg and duration.max - the drop down display labels in the pickers in the wizard will continue to use the sql-like notation e.g. date_histogram(timestamp), terms(clientip), sum(doc.bytes.sent), max(duration) - when auto-generating aggregation names, unsupported characters ([]>) will be removed.
Summary
So far the groupby/agg name shown in the dropdowns and the name used for the ES config agg name has been the same.
This PR changes the behaviour to the following:
group_by
aggregation names will be left as original e.g.clientip
,timestamp
doc.bytes.sent.sum
anddoc.bytes.sent.avg
andduration.max
date_histogram(timestamp)
,terms(clientip)
,sum(doc.bytes.sent)
,max(duration)
[]>
) will be removed.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.This was checked for cross-browser compatibility, including a check against IE11No DOM related changes.Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibility