FractalDataWorks.Services.Transformations
0.7.0-alpha.1022
This is a prerelease version of FractalDataWorks.Services.Transformations.
dotnet add package FractalDataWorks.Services.Transformations --version 0.7.0-alpha.1022
NuGet\Install-Package FractalDataWorks.Services.Transformations -Version 0.7.0-alpha.1022
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="FractalDataWorks.Services.Transformations" Version="0.7.0-alpha.1022" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FractalDataWorks.Services.Transformations" Version="0.7.0-alpha.1022" />
<PackageReference Include="FractalDataWorks.Services.Transformations" />
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 FractalDataWorks.Services.Transformations --version 0.7.0-alpha.1022
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FractalDataWorks.Services.Transformations, 0.7.0-alpha.1022"
#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 FractalDataWorks.Services.Transformations@0.7.0-alpha.1022
#: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=FractalDataWorks.Services.Transformations&version=0.7.0-alpha.1022&prerelease
#tool nuget:?package=FractalDataWorks.Services.Transformations&version=0.7.0-alpha.1022&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FractalDataWorks.Services.Transformations
Overview
The Transformations framework provides ServiceType auto-discovery for data transformation engines with unified interfaces that work across different transformation providers and processing patterns.
Features
- ServiceType Auto-Discovery: Add transformation packages and they're automatically registered
- Universal Transformation Interface: Same API works with all transformation engines
- Dynamic Engine Creation: Transformation services created via factories
- Source-Generated Collections: High-performance engine lookup
Quick Start
1. Install Packages
<ProjectReference Include="..\FractalDataWorks.Services.Transformations\FractalDataWorks.Services.Transformations.csproj" />
<ProjectReference Include="..\FractalDataWorks.Services.Transformations.Parallel\FractalDataWorks.Services.Transformations.Parallel.csproj" />
2. Register Services
// Program.cs - Zero-configuration registration
builder.Services.AddScoped<IGenericTransformationProvider, GenericTransformationProvider>();
// Single line registers ALL discovered transformation types
TransformationTypes.Register(builder.Services);
3. Configure Transformations
{
"Transformations": {
"DataProcessor": {
"TransformationType": "Parallel",
"MaxConcurrency": 8,
"BatchSize": 1000,
"EnableRetry": true,
"MaxRetryAttempts": 3
}
}
}
4. Use Universal Transformations
public class DataProcessingService
{
private readonly IGenericTransformationProvider _transformationProvider;
public DataProcessingService(IGenericTransformationProvider transformationProvider)
{
_transformationProvider = transformationProvider;
}
public async Task<IGenericResult<List<ProcessedData>>> ProcessDataAsync(List<RawData> rawData)
{
var engineResult = await _transformationProvider.GetTransformationEngine("DataProcessor");
if (!engineResult.IsSuccess)
return GenericResult<List<ProcessedData>>.Failure(engineResult.Error);
using var engine = engineResult.Value;
// Universal transformation - works with any engine
var transformationResult = await engine.TransformAsync<RawData, ProcessedData>(
rawData,
data => new ProcessedData
{
Id = data.Id,
ProcessedValue = data.RawValue.ToUpper(),
ProcessedAt = DateTimeOffset.UtcNow
});
return transformationResult;
}
}
Available Transformation Types
| Package | Transformation Type | Purpose |
|---|---|---|
FractalDataWorks.Services.Transformations.Parallel |
Parallel | High-performance parallel processing |
FractalDataWorks.Services.Transformations.Sequential |
Sequential | Sequential data processing |
FractalDataWorks.Services.Transformations.Streaming |
Streaming | Real-time stream processing |
How Auto-Discovery Works
- Source Generator Scans:
[ServiceTypeCollection]attribute triggers compile-time discovery - Finds Implementations: Scans referenced assemblies for types inheriting from
TransformationTypeBase - Generates Collections: Creates
TransformationTypes.All,TransformationTypes.Name(), etc. - Self-Registration: Each transformation type handles its own DI registration
Adding Custom Transformation Types
// 1. Create your transformation type (singleton pattern)
public sealed class CustomTransformationType : TransformationTypeBase<IGenericTransformationEngine, CustomTransformationConfiguration, ICustomTransformationFactory>
{
public static CustomTransformationType Instance { get; } = new();
private CustomTransformationType() : base(4, "Custom", "Transformation Engines") { }
public override Type FactoryType => typeof(ICustomTransformationFactory);
public override void Register(IServiceCollection services)
{
services.AddScoped<ICustomTransformationFactory, CustomTransformationFactory>();
services.AddScoped<CustomTransformationProcessor>();
services.AddScoped<CustomDataValidator>();
}
}
// 2. Add package reference - source generator automatically discovers it
// 3. TransformationTypes.Register(services) will include it automatically
Common Transformation Patterns
Batch Processing
public async Task<IGenericResult> ProcessLargeDatatAsync(IEnumerable<DataRecord> records)
{
var engineResult = await _transformationProvider.GetTransformationEngine("Parallel");
if (!engineResult.IsSuccess)
return GenericResult.Failure(engineResult.Error);
using var engine = engineResult.Value;
// Process in batches for memory efficiency
var result = await engine.TransformBatchAsync<DataRecord, ProcessedRecord>(
records,
batchSize: 1000,
transformer: batch => batch.Select(ProcessRecord).ToList());
return result;
}
Streaming Transformations
public async Task<IGenericResult> ProcessStreamAsync(IAsyncEnumerable<StreamData> dataStream)
{
var engineResult = await _transformationProvider.GetTransformationEngine("Streaming");
if (!engineResult.IsSuccess)
return GenericResult.Failure(engineResult.Error);
using var engine = engineResult.Value;
// Real-time stream processing
await foreach (var item in dataStream)
{
var transformResult = await engine.TransformAsync(item, TransformStreamItem);
if (!transformResult.IsSuccess)
// Handle transformation errors
continue;
}
return GenericResult.Success();
}
Architecture Benefits
- Engine Agnostic: Switch transformation engines without code changes
- Zero Configuration: Add package reference, get functionality
- Type Safety: Compile-time validation of transformation types
- Performance: Source-generated collections use FrozenDictionary
- Scalability: Each transformation type manages its own processing strategy
For complete architecture details, see Services.Abstractions README.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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.
-
net10.0
- FractalDataWorks.Abstractions (>= 0.7.0-alpha.1022)
- FractalDataWorks.Results (>= 0.7.0-alpha.1022)
- FractalDataWorks.Services (>= 0.7.0-alpha.1022)
- FractalDataWorks.Services.Abstractions (>= 0.7.0-alpha.1022)
- FractalDataWorks.Services.Transformations.Abstractions (>= 0.7.0-alpha.1022)
- FractalDataWorks.ServiceTypes (>= 0.7.0-alpha.1022)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0-rc.2.25502.107)
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.7.0-alpha.1022 | 125 | 11/3/2025 |
| 0.7.0-alpha.1021 | 127 | 11/3/2025 |
| 0.7.0-alpha.1008 | 103 | 11/2/2025 |
| 0.7.0-alpha.1006 | 127 | 10/30/2025 |
| 0.7.0-alpha.1005 | 123 | 10/30/2025 |
| 0.7.0-alpha.1004 | 126 | 10/30/2025 |
| 0.7.0-alpha.1001 | 133 | 10/29/2025 |
| 0.6.0-alpha.1006 | 131 | 10/29/2025 |
| 0.6.0-alpha.1005 | 127 | 10/28/2025 |
| 0.6.0-alpha.1004 | 120 | 10/28/2025 |