-
Notifications
You must be signed in to change notification settings - Fork 507
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
Conversation
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
@dlvenable and @oeyh: Would y'all mind taking a look at this one? |
There was a problem hiding this 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:
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Hai Yan <[email protected]>
Co-authored-by: Hai Yan <[email protected]>
Co-authored-by: Hai Yan <[email protected]>
Co-authored-by: Hai Yan <[email protected]>
There was a problem hiding this 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.
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Chris Moore <[email protected]>
Co-authored-by: Chris Moore <[email protected]>
Co-authored-by: Chris Moore <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
@@ -0,0 +1,305 @@ | |||
--- | |||
layout: default | |||
title: List to map processor |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
|
||
## Configuration | ||
|
||
The following table describes the configuration options used to generate target keys for the mappings: |
There was a problem hiding this comment.
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.
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
|
||
### 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. |
There was a problem hiding this comment.
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.
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
Also, why does this PR have a lot of other changes beyond |
If you mean my changes, then because it went through editorial review. |
_data-prepper/pipelines/configuration/processors/list-to-map.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Nathan Bower <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
@dlvenable: I made additional changes to make the taxonomy cleaner, including:
|
* 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>
* 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>
* 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]>
* 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]>
* 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]>
* 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]>
* 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]>
Fixes #3755
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.