Skip to content

Bracket syntax for accessing dotted field names in ingest processors #125566

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

felixbarny
Copy link
Member

@felixbarny felixbarny commented Mar 25, 2025

Allows accessing fields that have dots in their name via a bracket syntax.
For example: attributes['foo.bar'] or attributes["foo.bar"]

Open questions:

  • Should we also allow or require omitting quotes like attributes[foo.bar]?
  • Do we need an escape syntax?
  • Should we add a way to access array elements, such as resource.attributes['host.ip'][0]? Probably not now, we can add that later if needed.
  • Does anyone rely on being able to access fields with [ or ] in them? What about [', [", "], or ']?
  • Does this need an opt-in? That will depend on the answer of the question above.
  • Do we want to require users to explicitly define where the dotted fields are or should we try different combinations with attributes.foo.bar? I'd say maybe, even probably. But that's a separate thing which should have a separate syntax or way of opting in.

@elasticsearchmachine elasticsearchmachine added external-contributor Pull request authored by a developer outside the Elasticsearch team v9.1.0 labels Mar 25, 2025
@felixbarny felixbarny added >enhancement :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP labels Mar 25, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @felixbarny, I've created a changelog YAML for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >enhancement external-contributor Pull request authored by a developer outside the Elasticsearch team v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ingest pipeline processors: Syntax for explicit access of fields with dots
2 participants