Skip to content
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] Data frame transforms: Fix getting nested properties. #43262

Merged
merged 3 commits into from
Aug 14, 2019

Conversation

walterra
Copy link
Contributor

Summary

Follow up to #42117.

  • Fixes a regression where values were not properly extracted from nested objects.
  • Moves inline code we had to solve this to a utility function getNestedProperty(). Kibana's idx is a lodash-get replacement with TypeScript support. However, it requires that you'd know the accessor up front, it doesn't work with dynamic string values. getNestedProperty() allows you to pass a string like lodash-get, but it uses idx on the inside so you still get TypeScript support.

Checklist

For maintainers

@walterra walterra added bug Fixes for quality problems that affect the customer experience regression :ml v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.4.0 Feature:Data Frame Analytics ML data frame analytics features labels Aug 14, 2019
@walterra walterra requested a review from a team as a code owner August 14, 2019 12:22
@walterra walterra self-assigned this Aug 14, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice util function! LGTM

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⚡️

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@walterra walterra merged commit 97a6e8a into elastic:master Aug 14, 2019
@walterra walterra deleted the ml-fix-nested-properties branch August 14, 2019 14:35
walterra added a commit to walterra/kibana that referenced this pull request Aug 14, 2019
…3262)

- Fixes a regression where values were not properly extracted from nested objects.
- Moves inline code we had to solve this to a utility function getNestedProperty(). Kibana's idx is a lodash-get replacement with TypeScript support. However, it requires that you'd know the accessor up front, it doesn't work with dynamic string values. getNestedProperty() allows you to pass a string like lodash-get, but it uses idx on the inside so you still get TypeScript support.
walterra added a commit that referenced this pull request Aug 14, 2019
…43273)

- Fixes a regression where values were not properly extracted from nested objects.
- Moves inline code we had to solve this to a utility function getNestedProperty(). Kibana's idx is a lodash-get replacement with TypeScript support. However, it requires that you'd know the accessor up front, it doesn't work with dynamic string values. getNestedProperty() allows you to pass a string like lodash-get, but it uses idx on the inside so you still get TypeScript support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Frame Analytics ML data frame analytics features :ml regression release_note:skip Skip the PR/issue when compiling release notes v7.4.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants