Skip to content

Conversation

limotova
Copy link
Contributor

If one is using templates to generate values, this option can be helpful to avoid adding values that resolve into empty strings

Fixes #104813

If one is using templates to generate values, this option can be helpful
to avoid adding values that resolve into empty strings

Fixes elastic#104813
Copy link
Contributor

Documentation preview:

@elasticsearchmachine elasticsearchmachine added v8.14.0 needs:triage Requires assignment of a team area label external-contributor Pull request authored by a developer outside the Elasticsearch team labels Feb 22, 2024
@tlrx tlrx added the :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP label Feb 22, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Feb 22, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Feb 22, 2024
@joegallo joegallo self-requested a review March 8, 2024 18:18
Copy link
Contributor

@joegallo joegallo left a comment

Choose a reason for hiding this comment

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

I'd like to have this mirror the set processor's ignore_empty_value option, rather than creating a new option name with no precedent -- it's functionally the same as that option, right (albeit with the opposite sense)?

@romulets
Copy link
Member

This feature is actually pretty useful. I'm my use-case, I'm appending a lot of fields. To keep checking if they are not null on context is pretty repetitive. Right now we have a painless script that removes all empty values. But would be awesome to have this out of the box.

@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

It looks like this PR modifies one or more .asciidoc files. These files are being migrated to Markdown, and any changes merged now will be lost. See the migration guide for details.

Since it handles nulls now, this logic is identical.
This one is a bit trickier, so I've lampshaded the surprising part
with a comment, and also there's a newly added test on main via
This arity of setFieldValue doesn't handle the single-value
ignore_empty_value case (like in a set processor), it only handles the
multi-value ignore_empty_values case (like in an append
processor). The same thing applies to allow_duplicates, that is also
an append-only concern.
@joegallo
Copy link
Contributor

joegallo commented Sep 5, 2025

Oops, my one commit comment got truncated because I wasn't careful about syntax, that was intended to read:

Rewrite another setFieldValue arity, too

This one is a bit trickier, so I've lampshaded the surprising part
with a comment, and also there's a newly added test on main via
#134217

@nik9000

This comment was marked as resolved.

@nik9000

This comment was marked as resolved.

@joegallo
Copy link
Contributor

joegallo commented Sep 9, 2025

I merged main into this PR again, so that brings #134217 and #134319 in. They all play nicely together on my machine but we'll see what CI has to say about it.

@joegallo
Copy link
Contributor

joegallo commented Sep 9, 2025

A todo list for myself of what I'd still like to see here:

  • I need to resurrect the docs changes in markdown rather than asciidoc, including the example(s) I promised earlier in Add copy_from option to the Append processor #132003 (comment)
  • I need to add a test only feature, and also some rest tests
  • I think it makes sense to add more test coverage of ignore_empty_values with copy_from (that could probably be done with the previously mentioned rest tests)

Copy link
Contributor Author

@limotova limotova left a comment

Choose a reason for hiding this comment

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

I can't approve my own PR haha but the changes look reasonable to me, thank you!

Copy link
Contributor

github-actions bot commented Sep 29, 2025

🔍 Preview links for changed docs

Copy link
Contributor

ℹ️ Important: Docs version tagging

👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.

We use applies_to tags to mark version-specific features and changes.

Expand for a quick overview

When to use applies_to tags:

✅ At the page level to indicate which products/deployments the content applies to (mandatory)
✅ When features change state (e.g. preview, ga) in a specific version
✅ When availability differs across deployments and environments

What NOT to do:

❌ Don't remove or replace information that applies to an older version
❌ Don't add new information that applies to a specific version without an applies_to tag
❌ Don't forget that applies_to tags can be used at the page, section, and inline level

🤔 Need help?

@limotova limotova merged commit 72da17c into elastic:main Sep 30, 2025
34 checks passed
@limotova limotova deleted the add-allow-empty-values-append-processor branch September 30, 2025 04:01
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 Team:Data Management Meta label for data/management team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FR: Allow Append processor to ignore empty values

7 participants