Skip to content

Add support for multiple entries of 'with_keys' with 'delete_when' co…#5356

Merged
dlvenable merged 3 commits intoopensearch-project:mainfrom
niketan16:delete-processor-multiple-entries
Apr 21, 2025
Merged

Add support for multiple entries of 'with_keys' with 'delete_when' co…#5356
dlvenable merged 3 commits intoopensearch-project:mainfrom
niketan16:delete-processor-multiple-entries

Conversation

@niketan16
Copy link
Copy Markdown
Contributor

…ndition in delete_entries processor

Description

These changes add the support for multiple entries of with_keys with delete_when condition in the delete_entries processor

Issues Resolved

Resolves #5315

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…ndition in delete_entries processor

Signed-off-by: Niketan Chandarana <niketanc@amazon.com>
graytaylor0
graytaylor0 previously approved these changes Feb 12, 2025
)
})
@JsonPropertyOrder
@JsonClassDescription("The <code>delete_entries</code> processor deletes fields from events. " +
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Include that the user can either use with_keys or entries configuration to define the keys they want to delete, and not both.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed internally, this will be handled on the UI side, so the 2 ifthenelse configs are sufficient here.

@JsonProperty("with_keys")
@EventKeyConfiguration(EventKeyFactory.EventAction.DELETE)
@JsonPropertyDescription("A list of keys to be deleted.")
@JsonPropertyDescription("A list of keys to be deleted (legacy format).")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

specify in description that only one of with_keys and entries can be defined.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's not include legacy format in here. Just say something like A list of keys to be deleted. May not be used with entries..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated it.

…te_when` parameters of the older format.

Signed-off-by: Niketan Chandarana <niketanc@amazon.com>
@dlvenable dlvenable merged commit a681971 into opensearch-project:main Apr 21, 2025
45 of 48 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 21, 2025
#5356)

Add support for multiple entries of 'with_keys' with 'delete_when' condition in delete_entries processor

Signed-off-by: Niketan Chandarana <niketanc@amazon.com>
(cherry picked from commit a681971)
Davidding4718 pushed a commit to Davidding4718/data-prepper that referenced this pull request Apr 25, 2025
opensearch-project#5356)

Add support for multiple entries of 'with_keys' with 'delete_when' condition in delete_entries processor

Signed-off-by: Niketan Chandarana <niketanc@amazon.com>
Davidding4718 pushed a commit to Davidding4718/data-prepper that referenced this pull request Apr 25, 2025
opensearch-project#5356)

Add support for multiple entries of 'with_keys' with 'delete_when' condition in delete_entries processor

Signed-off-by: Niketan Chandarana <niketanc@amazon.com>
kkondaka pushed a commit that referenced this pull request Apr 27, 2025
#5356) (#5631)

Add support for multiple entries of 'with_keys' with 'delete_when' condition in delete_entries processor


(cherry picked from commit a681971)

Signed-off-by: Niketan Chandarana <niketanc@amazon.com>
Co-authored-by: Niketan Chandarana <42366580+niketan16@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multiple delete_when condition in delete_entries processor

4 participants