NPipeline.Extensions.Lineage 0.16.0

dotnet add package NPipeline.Extensions.Lineage --version 0.16.0
                    
NuGet\Install-Package NPipeline.Extensions.Lineage -Version 0.16.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NPipeline.Extensions.Lineage" Version="0.16.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NPipeline.Extensions.Lineage" Version="0.16.0" />
                    
Directory.Packages.props
<PackageReference Include="NPipeline.Extensions.Lineage" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NPipeline.Extensions.Lineage --version 0.16.0
                    
#r "nuget: NPipeline.Extensions.Lineage, 0.16.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NPipeline.Extensions.Lineage@0.16.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NPipeline.Extensions.Lineage&version=0.16.0
                    
Install as a Cake Addin
#tool nuget:?package=NPipeline.Extensions.Lineage&version=0.16.0
                    
Install as a Cake Tool

NPipeline.Extensions.Lineage

Comprehensive data lineage tracking and provenance capabilities for NPipeline pipelines.

Overview

The NPipeline.Extensions.Lineage extension provides production-ready lineage tracking for data flowing through NPipeline pipelines. Track the complete journey of each data item from source to destination, enabling data governance, debugging, audit trails, and data discovery.

Key Features

  • Item-level lineage tracking: Trace individual data items as they flow through each node in the pipeline
  • Pipeline-level reports: Generate high-level reports showing pipeline structure, nodes, edges, and data flow patterns
  • Configurable sampling: Reduce overhead with deterministic or random sampling strategies
  • Thread-safe collection: Lineage data is collected safely across parallel and concurrent pipeline executions
  • Flexible sinks: Built-in logging sinks with support for custom lineage sinks (e.g., databases, file systems, external services)
  • Dependency injection integration: Seamlessly integrates with Microsoft.Extensions.DependencyInjection
  • Data redaction: Optionally exclude actual data from lineage records to reduce memory usage and improve security
  • Comprehensive metadata: Capture hop timestamps, decision flags, observed cardinality, and ancestry information

Installation

dotnet add package NPipeline.Extensions.Lineage

Requirements

  • .NET 8.0, 9.0, or 10.0
  • Microsoft.Extensions.DependencyInjection.Abstractions 10.0.0 or later
  • Microsoft.Extensions.Logging.Abstractions 10.0.0 or later
  • NPipeline core package

Quick Start

Enable lineage tracking with dependency injection:

using Microsoft.Extensions.DependencyInjection;
using NPipeline.Lineage.DependencyInjection;
using NPipeline.Extensions.DependencyInjection;

var services = new ServiceCollection();

// Add NPipeline core services
services.AddNPipeline(Assembly.GetExecutingAssembly());

// Add lineage services with default logging sink
services.AddNPipelineLineage();

var serviceProvider = services.BuildServiceProvider();

Or configure directly on your pipeline builder:

using NPipeline.Pipeline;
using NPipeline.Lineage;

var builder = new PipelineBuilder("MyPipeline");

// Enable item-level lineage tracking
builder.EnableItemLevelLineage();

// Add a logging sink for pipeline-level lineage reports
builder.UseLoggingPipelineLineageSink();

// Build and execute the pipeline
var pipeline = builder.Build();
await pipeline.ExecuteAsync(serviceProvider);

Configuration

Lineage tracking behavior is configurable through LineageOptions:

  • Sampling: Control overhead with deterministic or random sampling (e.g., sample 1 in 10 items)
  • Data redaction: Exclude actual data from lineage records to reduce memory usage
  • Metadata capture: Configure which metadata to capture (timestamps, decisions, cardinality)
  • Memory management: Set materialization caps and overflow policies

For detailed configuration options, see the Configuration documentation.

Dependency Injection

Basic registration with default logging sink:

services.AddNPipelineLineage();

Custom sink types and factory delegates are supported. See the main documentation for advanced registration scenarios.

Common Use Cases

  • Data Governance: Track data provenance and transformation history for compliance requirements (GDPR, HIPAA, SOX)
  • Debugging: Quickly identify which node introduced data quality issues or transformation errors
  • Audit Trails: Prove data integrity and maintain complete transformation history
  • Data Discovery: Find what data depends on a particular source or transformation
  • Root Cause Analysis: Trace issues back to their origin in complex pipelines
  • Performance Monitoring: Understand data flow patterns and identify bottlenecks
  • Testing: Verify that data flows through the expected path in complex pipelines

Examples

See the Sample_LineageExtension project for complete working examples demonstrating:

  • Basic lineage tracking
  • Deterministic and random sampling
  • Complex join pipelines
  • Branching with lineage
  • Error handling with lineage
  • Custom lineage sinks

Documentation

For comprehensive documentation including detailed examples, configuration options, API reference, and troubleshooting:

License

MIT License - see LICENSE file for details.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.16.0 26 2/24/2026
0.15.0 42 2/19/2026
0.14.0 80 2/17/2026
0.13.1 82 2/13/2026
0.13.0 82 2/13/2026
0.12.0 87 2/9/2026
0.11.0 86 2/8/2026
0.10.0 91 2/6/2026
0.9.1 82 2/5/2026
0.9.0 89 2/5/2026
0.8.0 90 2/3/2026
0.7.1 87 2/1/2026
0.7.0 89 1/31/2026
0.6.6 86 1/21/2026
0.6.5 93 1/19/2026
0.6.4 92 1/18/2026
0.6.3 86 1/14/2026
0.6.2 94 1/13/2026
0.6.1 95 1/13/2026