PocketCsvReader.Avro
2.103.0
dotnet add package PocketCsvReader.Avro --version 2.103.0
NuGet\Install-Package PocketCsvReader.Avro -Version 2.103.0
<PackageReference Include="PocketCsvReader.Avro" Version="2.103.0" />
<PackageVersion Include="PocketCsvReader.Avro" Version="2.103.0" />
<PackageReference Include="PocketCsvReader.Avro" />
paket add PocketCsvReader.Avro --version 2.103.0
#r "nuget: PocketCsvReader.Avro, 2.103.0"
#:package PocketCsvReader.Avro@2.103.0
#addin nuget:?package=PocketCsvReader.Avro&version=2.103.0
#tool nuget:?package=PocketCsvReader.Avro&version=2.103.0
Read Avro files
Install the PocketCsvReader.Avro NuGet package in a Windows x64 application targeting .NET 8, 9, or 10. It includes the native decoder. The reader accepts Avro Object Container Files, including uncompressed, Deflate, Snappy, Zstandard, Bzip2, and XZ blocks.
using PocketCsvReader.Avro;
var reader = new AvroReader();
await foreach (var batch in reader.ToArrowBatchesAsync("events.avro", batchSize: 8_192))
{
using (batch)
{
Console.WriteLine(batch.Length);
}
}
using var rows = reader.ToDataReader("events.avro", columns: ["id", "name"]);
while (rows.Read())
{
var id = rows.GetInt64(0);
var name = rows.IsDBNull(1) ? null : rows.GetString(1);
}
ToArrowStream, ToArrowStreamAsync, ToArrowBatches, and ToArrowBatchesAsync accept either a path or a readable stream. Streams can be non-seekable. By default the reader closes an input stream on disposal. Pass leaveOpen: true to retain ownership. Dispose each Arrow batch when finished with it. A batch can outlive its Arrow stream.
ToDataReader exposes scalar columns and returns DBNull.Value for nulls. Column names are case-sensitive, and the order you supply is the output order. Use the Arrow APIs to consume nested values and multi-type unions. Column selection changes the row reader's output and the decoder still reads the file's full schema.
To build from source on Windows, install Rust through rustup and the Visual Studio C++ build tools. The project builds the pinned native library with Cargo. Packing also uses PowerShell 7 to collect third-party notices.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- PocketCsvReader.Arrow (>= 2.103.0)
-
net8.0
- PocketCsvReader.Arrow (>= 2.103.0)
-
net9.0
- PocketCsvReader.Arrow (>= 2.103.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.