Skip to content

FastIngestZero-Allocation Bulk Ingestion Pipeline for .NET

Stream CSV, Excel & JSON Lines (NDJSON) straight into PostgreSQL, SQL Server, MongoDB, Cosmos, and Elasticsearch with zero memory bloat and built-in validation.

FastIngest Logo

Lightning-Fast Streaming Ingestion ​

Ingesting millions of records shouldn't cause OutOfMemoryException or choke your database connection pool. FastIngest streams records chunk-by-chunk directly into native bulk protocols.

csharp
using FastIngest.Core.Pipeline;
using FastIngest.PostgreSql.Extensions;
using Npgsql;

await using var stream = File.OpenRead("transactions_10m.csv");
await using var conn = new NpgsqlConnection(connectionString);
await conn.OpenAsync();

var result = await FastIngestPipeline<TransactionRecord>.Create()
    .FromStream(stream, FileType.Csv)
    .WithMapping(map =>
    {
        map.Map(x => x.Id, "transaction_id");
        map.Map(x => x.AccountId, "account_id");
        map.Map(x => x.Amount, "amount");
        map.Map(x => x.Timestamp, "created_at");
    })
    .ValidateWith<TransactionValidator>()
    .WithBatchSize(10_000)
    .WithChannelCapacity(2)
    .WriteToPostgresAsync(conn, "transactions");

Console.WriteLine($"Ingested {result.TotalSucceeded:N0} rows in {result.Duration.TotalSeconds:F1}s!");

ASP.NET Core Integration ​

FastIngest natively integrates with ASP.NET Core, allowing you to easily stand up a high-performance ingestion API with background workers and real-time SignalR telemetry:

csharp
using FastIngest.AspNetCore.Extensions;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddFastIngestAspNetCore(ingest => {
    ingest.AddPostgreSqlSink("...");
    ingest.RegisterProfilesFromAssemblyContaining<Program>();
});

var app = builder.Build();

app.MapFastIngestHub("/hubs/fastingest"); // SignalR Progress Telemetry
app.MapFastIngestUpload<TransactionRecord>("/api/transactions/upload"); // 202 Accepted

app.Run();

Supported Destination Sinks ​

Database / SinkProtocol / EngineTypical ThroughputMemory Footprint
PostgreSQLNative Binary COPY FROM STDIN180,000+ rows/secConstant (~22 MB)
SQL Server / Azure SQLStreaming SqlBulkCopy + BatchDataReader140,000+ rows/secConstant (~26 MB)
MySQL / MariaDBMySqlBulkCopy Local Infile / Batched Insert110,000+ rows/secConstant (~24 MB)
SQLiteParameterized Batch Loop + WAL Mode95,000+ rows/secConstant (~18 MB)
MongoDBUnordered BulkWriteAsync (InsertOneModel)85,000+ rows/secConstant (~30 MB)
Azure Cosmos DBConcurrent Dispatch + AllowBulkExecution35,000+ docs/secConstant (~32 MB)
ElasticsearchBulkAsync (IndexOperation) NDJSON Chunking65,000+ docs/secConstant (~35 MB)

Built for AI & LLM Coding Assistants ​

FastIngest provides machine-readable documentation conforming to the llms.txt standard. When asking questions in Cursor, Windsurf, Claude Code, GitHub Copilot, or ChatGPT:

  • /llms.txt: Fast, token-efficient index of all concepts, architecture guides, and database sinks.
  • /llms-full.txt: Comprehensive single-file documentation for instant context window ingestion.

Released under the MIT License.