![]() ![]() The more items are in the collection, the bigger benefit serialization brings.Avro does not bring benefits when a dataset is a single item or a small collection (It shows data from the table, in relation to JSON size. The result looks more interesting on the chart above. Size of the data by a number of records and serialization method , The extracted schema looks like follows, Bonus: Avro and JSON compression benchmarkĮxample data = (N) Var schema = AvroConvert.GetSchema(avroBytes) var avroBytes = File.ReadAllBytes("sample.avro") Its interface is very similar to Newtonsoft.Json library, which makes it very easy to use. The library, which helps with the handling of Avro files is called AvroConvert ( link). The easiest way is to manually open notepad, copy the header and extract the schema from it. But I would like to show you, how to do this in an automated way. The first step is to read the schema (model) of the file. Our goal is to handle unknown Avro files, that we are going to process in near future. For example and more information, take a look at the benchmark section at the end of this article. ![]() The benefit of compression is the most valuable when working with large collections of data. It enables backward and forwards compatibility features, which is unique for this level of data compression. Model is represented in well-known and human-readable JSON format.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |