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

feat(enrichment_tables): add json file support for enrichment tables #21312

Open
altanozlu opened this issue Sep 18, 2024 · 1 comment
Open
Labels
domain: enrichment_tables Anything related to the Vector's enrichment tables type: feature A value-adding code addition that introduce new functionality.

Comments

@altanozlu
Copy link

altanozlu commented Sep 18, 2024

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Use Cases

  • I would like to enrich my inputs with consul metadata and I would like to use json directly rather than converting json into csv then try to work around.

Attempted Solutions

  • using csv and encoding/decoding some json values, which I don't want to do for each input.

Proposal

  • Support json file directly, as long as json input compatible with Value object it should be fine.
  • json file itself must be as list of object.
  • There should be no need for further schema definitions since json file is converted to Value directly.
[enrichment_tables.metadata]
type = "file"

[enrichment_tables.metadata.file]
path = "/etc/vector/consul_metadata.json"
encoding = { type = "json" }

json file:

[
{"ip": "0.0.0.0", "version": 0.1}, 
{"ip": "0.0.0.x", "version": 0.5}
]

References

No response

Version

vector 0.41.1 (x86_64-apple-darwin 745babd 2024-09-11 14:55:36.802851761)

@altanozlu altanozlu added the type: feature A value-adding code addition that introduce new functionality. label Sep 18, 2024
@jszwedko jszwedko added the domain: enrichment_tables Anything related to the Vector's enrichment tables label Sep 23, 2024
@jszwedko
Copy link
Member

Thanks @altanozlu ! I agree that this would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: enrichment_tables Anything related to the Vector's enrichment tables type: feature A value-adding code addition that introduce new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants