VOOZH about

URL: https://www.nuget.org/packages/DeltaIO/

⇱ NuGet Gallery | DeltaIO 1.0.0-alpha.4




👁 Image
DeltaIO 1.0.0-alpha.4

This is a prerelease version of DeltaIO.
dotnet add package DeltaIO --version 1.0.0-alpha.4
 
 
NuGet\Install-Package DeltaIO -Version 1.0.0-alpha.4
 
 
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="DeltaIO" Version="1.0.0-alpha.4" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DeltaIO" Version="1.0.0-alpha.4" />
 
Directory.Packages.props
<PackageReference Include="DeltaIO" />
 
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 DeltaIO --version 1.0.0-alpha.4
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DeltaIO, 1.0.0-alpha.4"
 
 
#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 DeltaIO@1.0.0-alpha.4
 
 
#: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=DeltaIO&version=1.0.0-alpha.4&prerelease
 
Install as a Cake Addin
#tool nuget:?package=DeltaIO&version=1.0.0-alpha.4&prerelease
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Delta.IO 👁 NuGet Version

This is an ongoing attempt to implement delta.io in pure .net with no native dependencies, wrappers and so on.

Why implement the Delta Lake transaction log protocol in .NET?

Delta Spark depends on Java and Spark, which is fine for many use cases, but not all Delta Lake users want to depend on these libraries. This library allows using Delta Lake in C# or other languages using .NET runtime.

It lets you query Delta tables with blazing speed without depending on Java/Scala.

Suppose you want to query a Delta table with on your local machine. This library makes it easy to query the table with a simple dotnet add package command - no need to install Java or Spark.

This library heavily relies on parquet-dotnet - a fast, safe, pure parquet implementation in .NET, for reading delta log checkpoints and the data itself.

Delta lake for idiots (like myself)

Delta lake essentially stores data as a set of parquet files. When you add a set of rows to the delta lake table, it essentially adds more parquet files. The problem is only to figure out which files to read.

Sometimes delta tables will be "compacted" to minimise the number of files and reorganise the storage for more efficiency, especially if those files are small and there are a lot of them.

When you delete rows from a delta lake table, some files will be deleted. But wait, what happens if you want to delete one row, and the file it's in contains other rows as well? In that case delta lake will mark the file as deleted, and create a new file without that row.

So the purpose of the delta lake library like this is to figure out which files are relevant.

Delta tables also support versioning, because files are kept for reasons of time travel. So that you can tell which files were relevant at specific point of time.

Status

This library is almost at the stage where it can read delta tables. The aim of the first version is to fully support reading the lake, with next version to support modification operations as well. You can already use it for non-critical workloads today.

Quick start

After installing the nuget package 👁 NuGet Version
, find out type of storage your tables are stored in. We will stick with local disk here, but there are plenty of other options. This library relies on Stowage library to abstract the locations of source files. Let's say I have three delta tables in D:\delta-dotnet\src\DeltaLake.Test\data\chinook folder, which looks like this:

using DeltaLake;
using Stowage;

// point to location where delta table root is stored
IFileStorage location = Files.Of.LocalDiskStorage("D:/delta-dotnet/src/DeltaLake.Test/data/chinook");

// open "artist.simple" table
Table table = await Table.OpenAsync(location, "chinook");

This will instantiate an interface to the delta table, so you can start performing other operations.

Reading

To figure out which files are valid for current delta table, read the DataFiles property;

IReadOnlyCollection<DataFile> dataFiles = table.DataFiles;

This returns the list of files at the latest version of this table. Each DataFile contains basic metadata about those data files, including it's size in bytes, partitions and their values, creation timestamp and, most importantly, path to the actual data in parquet format.

You can choose which files to read, and do the following:

// let's open the first data file
using Stream parquetStream =
 await table.OpenSeekableStreamAsync(dataFiles.First());

Then read file data in any way you would normally do with Parquet.Net library, for example deserialise them into Artist:

public class Artist {
 public int? ArtistId { get; set; }

 public string? Name { get; set; }
}

IList<Artist> artists = await ParquetSerializer.DeserializeAsync<Artist>(parquetStream);

Appending

Stay tuned!

Deleting

Tune in!

Contributing

Bookmark, star, start discussions, spread the word if you are interested in the future of this project! You can also donate to the project if you find it useful.

Useful Links

Product Versions Compatible and additional computed target framework versions.
.NET net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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
1.0.0-alpha.4 806 11/14/2024
1.0.0-alpha.3 252 11/12/2024
1.0.0-alpha.2 147 11/11/2024
1.0.0-alpha.1 135 11/8/2024
0.0.0-pre.5 132 11/6/2024
0.0.0-pre.4 129 10/30/2024
0.0.0-pre.3 135 10/30/2024