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

How to serialize multiple objects into one avro? #164

Open
ChristianSauer opened this issue Jun 19, 2024 · 3 comments
Open

How to serialize multiple objects into one avro? #164

ChristianSauer opened this issue Jun 19, 2024 · 3 comments

Comments

@ChristianSauer
Copy link

I have a range of objects I want to serialize into one avro - since I need to match the Azure Eventhub Schema I need to store an object per Record.
Unfortunately, it seems the API is able to do so?
AvroConvert.Serialize accepts only a single object, and while merge could to the job, its serious overhead for the number of objects I have.
I considered using encoder directly, but sadly that class is internal.

@AdrianStrugala
Copy link
Owner

Hey,
Please take a look at the PR: #119
Would the proposed serialization be solution to your problem?
Adrian

@ChristianSauer
Copy link
Author

Does it serialize into rows? I'm unsure by looking at the PR.

@JLysberg
Copy link

Hey, Please take a look at the PR: #119 Would the proposed serialization be solution to your problem? Adrian

I had a similar issue with AvroConvert.Serialize serializing an IEnumerable<T> into a single array record, as opposed to multiple records with schemas inferred from T. PR #119 did indeed solve for my use-case. I am looking forward to a v4 release to see a similar implementation deployed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants