Skip to content

enhancement(json_parser transform): Add support for target field configuration#1165

Merged
bruceg merged 6 commits intomasterfrom
json-parser-target-field
Nov 14, 2019
Merged

enhancement(json_parser transform): Add support for target field configuration#1165
bruceg merged 6 commits intomasterfrom
json-parser-target-field

Conversation

@bruceg
Copy link
Copy Markdown
Member

@bruceg bruceg commented Nov 9, 2019

Adds support for a new target_field configuration that prefixes the parsed JSON object with the given name, producing a sub-object.

Closes #1158

This causes the parsed JSON to be inserted into the log as a sub-object
with the given name.

Signed-off-by: Bruce Guenter <bruce@untroubled.org>
Signed-off-by: Bruce Guenter <bruce@untroubled.org>
@bruceg bruceg added transform: json_parser type: enhancement A value-adding code change that enhances its existing functionality. labels Nov 11, 2019
Copy link
Copy Markdown
Member

@lukesteensen lukesteensen left a comment

Choose a reason for hiding this comment

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

I do think it should be possible to overwrite an existing field, mostly because it leads to the output being more consistent. That's not quite as straightforward with our current data model as it will be when we have nested fields, so maybe something we implement as a follow-up.

@ghost
Copy link
Copy Markdown

ghost commented Nov 12, 2019

I do think it should be possible to overwrite an existing field, mostly because it leads to the output being more consistent.

Maybe it could be an option to add an additional config parameter overwrite which would allow users to pick whether to overwrite existing fields or not?

@bruceg bruceg removed the request for review from LucioFranco November 12, 2019 15:41
@bruceg bruceg force-pushed the json-parser-target-field branch from c5fdd23 to 26adccd Compare November 13, 2019 22:28
Signed-off-by: Bruce Guenter <bruce@untroubled.org>
@bruceg bruceg requested a review from lukesteensen November 13, 2019 22:47
Signed-off-by: Bruce Guenter <bruce@untroubled.org>
@bruceg bruceg merged commit e0433fd into master Nov 14, 2019
@bruceg bruceg deleted the json-parser-target-field branch November 14, 2019 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A value-adding code change that enhances its existing functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add new target_field configuration to json_parser transform

2 participants