Parquet.SourceGenerator.Attributes
0.0.2
See the version list below for details.
dotnet add package Parquet.SourceGenerator.Attributes --version 0.0.2
NuGet\Install-Package Parquet.SourceGenerator.Attributes -Version 0.0.2
<PackageReference Include="Parquet.SourceGenerator.Attributes" Version="0.0.2" />
<PackageVersion Include="Parquet.SourceGenerator.Attributes" Version="0.0.2" />
<PackageReference Include="Parquet.SourceGenerator.Attributes" />
paket add Parquet.SourceGenerator.Attributes --version 0.0.2
#r "nuget: Parquet.SourceGenerator.Attributes, 0.0.2"
#:package Parquet.SourceGenerator.Attributes@0.0.2
#addin nuget:?package=Parquet.SourceGenerator.Attributes&version=0.0.2
#tool nuget:?package=Parquet.SourceGenerator.Attributes&version=0.0.2
Parquet.SourceGenerator
A zero-reflection C# Roslyn source generator that emits Parquet serializers and deserializers at compile time, targeting Parquet.Net low-level primitives.
ðĶ Installation
dotnet add package Parquet.SourceGenerator
dotnet add package Parquet.Net
Parquet.SourceGenerator.Attributes is automatically included as a dependency. Parquet.Net must be referenced directly by your project.
ð Quick Start Example
using System;
using Parquet.SourceGenerator;
[ParquetSerializable]
public partial record UserEvent
{
[ParquetColumn("event_id", Order = 1)]
public Guid Id { get; init; }
[ParquetColumn("username", Order = 2)]
public string Username { get; init; } = string.Empty;
[ParquetColumn("timestamp", Order = 3)]
[ParquetTimestamp(ParquetTimestampUnit.Microseconds)]
public DateTime Timestamp { get; init; }
[ParquetColumn("duration", Order = 4)]
public TimeSpan Duration { get; init; }
}
Writing Parquet Files
List<UserEvent> events = GetEvents();
using var stream = File.Create("events.parquet");
// Simple write
await events.WriteParquetAsync(stream);
// Chunked row-group streaming write
await events.WriteParquetBatchedAsync(stream, rowGroupSize: 10_000);
// Stream directly from IAsyncEnumerable<T>
IAsyncEnumerable<UserEvent> eventStream = GetAsyncEventStream();
await eventStream.WriteParquetAsync(stream, rowGroupSize: 10_000);
Reading Parquet Files (Sequential & Parallel)
using var stream = File.OpenRead("events.parquet");
// Sequential read
List<UserEvent> events = await UserEventParquetExtensions.ReadParquetAsync(stream);
// Multi-core parallel read across row groups
List<UserEvent> parallelEvents = await UserEventParquetExtensions.ReadParquetParallelAsync(stream, maxDegreeOfParallelism: 4);
// Read from in-memory byte buffer
ReadOnlyMemory<byte> buffer = File.ReadAllBytes("events.parquet");
List<UserEvent> memEvents = await UserEventParquetExtensions.ReadParquetAsync(buffer);
Custom Configuration (ParquetSerializerOptions)
var options = new ParquetSerializerOptions
{
RowGroupSize = 25_000,
MaxDegreeOfParallelism = 8,
CompressionMethod = ParquetCompressionMethod.Zstd
};
await events.WriteParquetBatchedAsync(stream, options: options);
Compression options: None, Snappy (default), Gzip, Lz4, Brotli, Zstd.
⥠Performance & Benchmarks
Zero-reflection C# source generation vs ParquetSerializer v6 reflection baseline:
| Operation | Scale | Reflection Baseline | Source Generator | Speedup | Memory Reduction |
|---|---|---|---|---|---|
| File Serialization (Write) | 100,000 items | 7.71 ms (12.63 MB) | 3.65 ms (7.02 MB) | ⥠2.1x faster | ð 44% less memory |
| Streaming Batched Write | 100,000 items | 7.71 ms (12.63 MB) | 4.41 ms (5.45 MB) | ⥠1.8x faster | ð 57% less memory |
| File Deserialization (Read) | 100,000 items | 5.05 ms (4.62 MB) | 6.29 ms (10.91 MB) | 1.25x baseline | 2.36x alloc |
| Guid Serialization | 10,000 items | 1.47 ms (2.95 MB) | 910.8 Ξs (1.81 MB) | ⥠1.6x faster | ð 39% less memory |
ð Note: BenchmarkDotNet results captured on GitHub Actions. Detailed multi-scale reports (1K, 10K, 100K, 1M rows) are in docs/BENCHMARKS.md.
ðĄïļ Compiler Diagnostics
| Diagnostic ID | Severity | Description |
|---|---|---|
PARQ001 |
Error | Target type decorated with [ParquetSerializable] must be declared as partial. |
PARQ002 |
Error | Duplicate [ParquetColumn] column names detected on model. |
PARQ003 |
Warning | Target type has no valid public serializable properties or fields. |
PARQ004 |
Warning | Non-public property decorated with [ParquetColumn] will be ignored. |
PARQ005 |
Error | Invalid [ParquetDecimal] precision or scale parameters. |
ð Links & Resources
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Parquet.SourceGenerator.Attributes:
| Package | Downloads |
|---|---|
|
Parquet.SourceGenerator
Package Description |
|
|
Parquet.SourceGenerator.Legacy
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.3 | 162 | 9/5/2026 |
| 0.0.2 | 159 | 9/2/2026 |
| 0.0.1-dev.2 | 82 | 8/6/2026 |
| 0.0.1-dev.1 | 71 | 8/5/2026 |