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

Add list to map processor #3806

Merged
merged 18 commits into from
Apr 20, 2023
Merged

Add list to map processor #3806

merged 18 commits into from
Apr 20, 2023

Conversation

Naarcha-AWS
Copy link
Collaborator

Fixes #3755

Checklist

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

Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
@Naarcha-AWS Naarcha-AWS added the 3 - Tech review PR: Tech review in progress label Apr 18, 2023
Signed-off-by: Naarcha-AWS <[email protected]>
@Naarcha-AWS
Copy link
Collaborator Author

@dlvenable and @oeyh: Would y'all mind taking a look at this one?

Copy link
Contributor

@oeyh oeyh left a comment

Choose a reason for hiding this comment

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

Looks great. Just a few small things:

@Naarcha-AWS Naarcha-AWS added 4 - Doc review PR: Doc review in progress and removed 3 - Tech review PR: Tech review in progress labels Apr 19, 2023
Copy link
Contributor

@cwillum cwillum left a comment

Choose a reason for hiding this comment

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

Looks good with suggestions.

@Naarcha-AWS Naarcha-AWS added 5 - Editorial review PR: Editorial review in progress and removed 4 - Doc review PR: Doc review in progress labels Apr 20, 2023
@@ -0,0 +1,305 @@
---
layout: default
title: List to map processor
Copy link
Member

Choose a reason for hiding this comment

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

Also, per #3666 I think we should use the actual processor name.


# list_to_map

The `list-to-map` processor converts a list of objects from an event, where each object contains a `key` field, into a map of target keys.
Copy link
Member

Choose a reason for hiding this comment

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

list_to_map -> Use hyphens.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I mean, you should use underscores instead of hyphens.

Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@Naarcha-AWS Please see my comments and changes and let me know if you have any questions. Thanks!

@@ -0,0 +1,305 @@
---
layout: default
title: List to map processor
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like we use "List to map", "list_to_map", and "list-to-map". Please ensure consistent usage globally.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We have a discussion about the title standard going in #3666. Fixed the consistency on the page, but leaving the title the same for now to address once we come to a decision on the title convention.


## Configuration

The following table describes the configuration options used to generate target keys for the mappings:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't introduce a table with a colon.


### Example: No `value_key` specified

The follow example `pipeline.yaml` shows the `list_to_map` processor with no `value_key` specified. Since `key` is set to the objects `name`, the processor extracts the names of each object to use as keys in the map.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use since only to describe time events. Don’t use in place of because.

@natebower natebower removed the 5 - Editorial review PR: Editorial review in progress label Apr 20, 2023
@dlvenable
Copy link
Member

Also, why does this PR have a lot of other changes beyond list_to_map?

@natebower
Copy link
Collaborator

Also, why does this PR have a lot of other changes beyond list_to_map?

If you mean my changes, then because it went through editorial review.

@Naarcha-AWS
Copy link
Collaborator Author

Also, why does this PR have a lot of other changes beyond list_to_map?

@dlvenable: I made additional changes to make the taxonomy cleaner, including:

  • Change nav_order so processors appear in alpha order.
  • Remove redundant content for Mutate event processors, where mutate event content would appear both on its single page AND the Mutate event page.
  • Fixed the titles for consistency, though we'll likely readdress them depending on the outcome of [DOC] Data Prepper plugin naming consistency #3666

@Naarcha-AWS Naarcha-AWS merged commit e1a1f44 into main Apr 20, 2023
@Naarcha-AWS Naarcha-AWS deleted the list-to-map-processor branch April 20, 2023 18:48
@Naarcha-AWS Naarcha-AWS added backport 2.5 PR: Backport label for 2.5 backport 2.6 PR: Backport label for 2.6 labels Apr 20, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 20, 2023
* Add list to map processor.

Signed-off-by: Naarcha-AWS <[email protected]>

* Tweak one last file

Signed-off-by: Naarcha-AWS <[email protected]>

* Fix typo

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update mutate-event.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Add Chris' feedback

Signed-off-by: Naarcha-AWS <[email protected]>

* A couple more wording tweaks

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Nathan Bower <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Nathan Bower <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>

---------

Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Hai Yan <[email protected]>
Co-authored-by: Chris Moore <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
(cherry picked from commit e1a1f44)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 20, 2023
* Add list to map processor.

Signed-off-by: Naarcha-AWS <[email protected]>

* Tweak one last file

Signed-off-by: Naarcha-AWS <[email protected]>

* Fix typo

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update mutate-event.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Add Chris' feedback

Signed-off-by: Naarcha-AWS <[email protected]>

* A couple more wording tweaks

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Nathan Bower <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Nathan Bower <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>

---------

Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Hai Yan <[email protected]>
Co-authored-by: Chris Moore <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
(cherry picked from commit e1a1f44)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Naarcha-AWS pushed a commit that referenced this pull request Apr 20, 2023
* Add list to map processor.



* Tweak one last file



* Fix typo



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update mutate-event.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Add Chris' feedback



* A couple more wording tweaks



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Apply suggestions from code review



---------





(cherry picked from commit e1a1f44)

Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hai Yan <[email protected]>
Co-authored-by: Chris Moore <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Naarcha-AWS pushed a commit that referenced this pull request Apr 20, 2023
* Add list to map processor.



* Tweak one last file



* Fix typo



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update mutate-event.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Add Chris' feedback



* A couple more wording tweaks



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Update _data-prepper/pipelines/configuration/processors/list-to-map.md



* Apply suggestions from code review



---------





(cherry picked from commit e1a1f44)

Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hai Yan <[email protected]>
Co-authored-by: Chris Moore <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
vagimeli pushed a commit that referenced this pull request Apr 25, 2023
* Add list to map processor.

Signed-off-by: Naarcha-AWS <[email protected]>

* Tweak one last file

Signed-off-by: Naarcha-AWS <[email protected]>

* Fix typo

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update mutate-event.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Add Chris' feedback

Signed-off-by: Naarcha-AWS <[email protected]>

* A couple more wording tweaks

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Nathan Bower <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Nathan Bower <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>

---------

Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Hai Yan <[email protected]>
Co-authored-by: Chris Moore <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
vagimeli added a commit that referenced this pull request Apr 25, 2023
vagimeli added a commit that referenced this pull request Apr 25, 2023
vagimeli pushed a commit that referenced this pull request May 4, 2023
* Add list to map processor.

Signed-off-by: Naarcha-AWS <[email protected]>

* Tweak one last file

Signed-off-by: Naarcha-AWS <[email protected]>

* Fix typo

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update mutate-event.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Add Chris' feedback

Signed-off-by: Naarcha-AWS <[email protected]>

* A couple more wording tweaks

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Nathan Bower <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Nathan Bower <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>

---------

Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Hai Yan <[email protected]>
Co-authored-by: Chris Moore <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
vagimeli added a commit that referenced this pull request May 4, 2023
harshavamsi pushed a commit to harshavamsi/documentation-website that referenced this pull request Oct 31, 2023
* Add list to map processor.

Signed-off-by: Naarcha-AWS <[email protected]>

* Tweak one last file

Signed-off-by: Naarcha-AWS <[email protected]>

* Fix typo

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Hai Yan <[email protected]>

* Update mutate-event.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Chris Moore <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Add Chris' feedback

Signed-off-by: Naarcha-AWS <[email protected]>

* A couple more wording tweaks

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Nathan Bower <[email protected]>

* Update _data-prepper/pipelines/configuration/processors/list-to-map.md

Co-authored-by: Nathan Bower <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>

---------

Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Hai Yan <[email protected]>
Co-authored-by: Chris Moore <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.5 PR: Backport label for 2.5 backport 2.6 PR: Backport label for 2.6 data-prepper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Update docs for Data Prepper mutate event processors
6 participants