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

Support loading Avro schema from file #19663

Open
silverwind opened this issue Jan 19, 2024 · 0 comments
Open

Support loading Avro schema from file #19663

silverwind opened this issue Jan 19, 2024 · 0 comments
Labels
domain: codecs Anything related to Vector's codecs (encoding/decoding) type: feature A value-adding code addition that introduce new functionality.

Comments

@silverwind
Copy link
Contributor

silverwind commented Jan 19, 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

For various sources and sinks like Kafka, one must currently inline the Avro schema via encoding.avro.schema or decoding.avro.schema into the config which is cumbersome because of escaping and general unwieldiness of big JSON strings.

Proposal

Add a option encoding.avro.schema_file that is treated mutually exclusive with encoding.avro.schema to load the schema from a relative or absolute file path:

encoding.avro.schema_file = "./schema.json"
  • It should load valid JSON files (e.g. no escaping)
  • Path resolution should work just like the file option of remap.

Version

0.35.0

@silverwind silverwind added the type: feature A value-adding code addition that introduce new functionality. label Jan 19, 2024
@silverwind silverwind changed the title Load Avro schema from file Support loading Avro schema from file Jan 19, 2024
@jszwedko jszwedko added the domain: codecs Anything related to Vector's codecs (encoding/decoding) label Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: codecs Anything related to Vector's codecs (encoding/decoding) type: feature A value-adding code addition that introduce new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants