Skip to content

[ML] Data frame transforms: Fix getting nested properties.#43262

Merged
walterra merged 3 commits intoelastic:masterfrom
walterra:ml-fix-nested-properties
Aug 14, 2019
Merged

[ML] Data frame transforms: Fix getting nested properties.#43262
walterra merged 3 commits intoelastic:masterfrom
walterra:ml-fix-nested-properties

Conversation

@walterra
Copy link
Copy Markdown
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
Copy Markdown
Contributor

Pinging @elastic/ml-ui

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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