TETL 1.1.7

dotnet add package TETL --version 1.1.7
NuGet\Install-Package TETL -Version 1.1.7
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="TETL" Version="1.1.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TETL --version 1.1.7
#r "nuget: TETL, 1.1.7"
#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.
// Install TETL as a Cake Addin
#addin nuget:?package=TETL&version=1.1.7

// Install TETL as a Cake Tool
#tool nuget:?package=TETL&version=1.1.7

TETL

Textfile Extract, Transform and Load is a lightweight .NET library to facilitate text file serialisation to objects, and then on to database endpoints. It is designed to handle large amounts of data by dealing with streams, so it is able to process the file row by row performing operations as required rather than having to have the entire file in memory at any one time.

You might want to use this if using SSIS to load and transform your data isn't practical due to licencing concerns, or you'd rather have a pure .NET solution for a simple ETL task.

Supported Runtimes

  • .NET Framework 4.6.1+

Supported Database Targets

  • MS SQL Server

Basic usage

Given a text file you wish to deserialize to a .NET object:

Name;Weight;Height
Fred;71.3;165
Andy;80.2;180
Jane;63.5;160

1 First Decorate your class with the TextFileMappingAttribute

public class WeightEntry
{
    [TextFileMappingAttribute(ColumnName = "Name")]
    public string Name { get; set; }
    [TextFileMappingAttribute(ColumnName = "Weight")]
    public double Weight { get; set; }
    [TextFileMappingAttribute(ColumnName = "Height")]
    public int Height { get; set; }
}

2 Create an instance of the TextFileSerializer

TextFileSerializer<WeightEntry> textFileSerializer = new TextFileSerializer<WeightEntry>(@"c:\temp\myTextFile")
{
    Delimiter = ";",
    FirstRowHeader = true
};

3 Consume the data via enumeration

foreach (WeightEntry data in textFileSerializer)
  Console.WriteLine($"Name = {data.Name}, Height = {data.Height}; Weight = {data.Weight}");
Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
1.1.7 602 8/2/2019
1.1.5 490 7/4/2019
1.1.4 803 1/24/2019
1.0.9 800 1/24/2019
1.0.8 790 1/24/2019
1.0.3 663 10/18/2018

v1.1.7: Add skip predicate feature.