All Projects → aloneguid → parquet-dotnet

aloneguid / parquet-dotnet

Licence: MIT license
🐬 Apache Parquet for modern .Net

Programming Languages

C#
18002 projects
Thrift
134 projects

Projects that are alternatives of or similar to parquet-dotnet

Puremvc Csharp Multicore Framework
PureMVC MultiCore Framework for C#
Stars: ✭ 166 (-16.58%)
Mutual labels:  xamarin, xbox
Mutatio
Visual Studio for Mac add-in/extension for converting old PCLs to .NET Standard 2.0 targeting projects automatically.
Stars: ✭ 27 (-86.43%)
Mutual labels:  xamarin, dotnet-standard
Spark
.NET for Apache® Spark™ makes Apache Spark™ easily accessible to .NET developers.
Stars: ✭ 1,721 (+764.82%)
Mutual labels:  apache-spark, dotnet-standard
Linqtotwitter
LINQ Provider for the Twitter API (C# Twitter Library)
Stars: ✭ 401 (+101.51%)
Mutual labels:  xamarin, dotnet-standard
Tweetinvi
Tweetinvi, an intuitive Twitter C# library for the REST and Stream API. It supports .NET, .NETCore, UAP (Xamarin)...
Stars: ✭ 812 (+308.04%)
Mutual labels:  xamarin, dotnet-standard
Mathparser.org Mxparser
Math Parser Java Android C# .NET/MONO (.NET Framework, .NET Core, .NET Standard, .NET PCL, Xamarin.Android, Xamarin.iOS) CLS Library - a super easy, rich and flexible mathematical expression parser (expression evaluator, expression provided as plain text / strings) for JAVA and C#. Main features: rich built-in library of operators, constants, math functions, user defined: arguments, functions, recursive functions and general recursion (direct / indirect). Additionally parser provides grammar and internal syntax checking.
Stars: ✭ 624 (+213.57%)
Mutual labels:  xamarin, dotnet-standard
Puremvc Csharp Standard Framework
PureMVC Standard Framework for C#
Stars: ✭ 335 (+68.34%)
Mutual labels:  xamarin, xbox
Ble.net
Cross-platform Bluetooth Low Energy (BLE) library for Android, iOS, and UWP
Stars: ✭ 137 (-31.16%)
Mutual labels:  xamarin, dotnet-standard
Nethereum.UI.Wallet.Sample
Cross platform wallet example using Nethereum, Xamarin.Forms and MvvmCross
Stars: ✭ 77 (-61.31%)
Mutual labels:  xamarin, xbox
Xamarin.Android.Skobbler
C# bindings for the Skobbler Android SDK
Stars: ✭ 16 (-91.96%)
Mutual labels:  xamarin
crontab
cron expression parser and executor for dotnet core.
Stars: ✭ 13 (-93.47%)
Mutual labels:  dotnet-standard
FileConvert
Converts between file formats such as CSV and Parquet
Stars: ✭ 14 (-92.96%)
Mutual labels:  apache-parquet
ably-dotnet
.NET, Xamarin and Mono client library SDK for Ably realtime messaging service
Stars: ✭ 32 (-83.92%)
Mutual labels:  xamarin
SparkTwitterAnalysis
An Apache Spark standalone application using the Spark API in Scala. The application uses Simple Build Tool(SBT) for building the project.
Stars: ✭ 29 (-85.43%)
Mutual labels:  apache-spark
XamarinIoTWorkshop
A workshop that demonstrates how to collect IoT data from a mobile device using a Xamarin app, aggregating the data to the cloud using Azure IoT Hub
Stars: ✭ 13 (-93.47%)
Mutual labels:  xamarin
YuzuMarker
🍋 [WIP] Manga Translation Tool
Stars: ✭ 76 (-61.81%)
Mutual labels:  xamarin
Claytondus.AmazonMWS
.NET Standard fork of Amazon MWS client
Stars: ✭ 32 (-83.92%)
Mutual labels:  dotnet-standard
NeoClient
🦉 Lightweight OGM for Neo4j which support transactions and BOLT protocol.
Stars: ✭ 21 (-89.45%)
Mutual labels:  dotnet-standard
XamarinClipboardPlugin
Cross Platform Clipboard access for Xamarin
Stars: ✭ 24 (-87.94%)
Mutual labels:  xamarin
PastelXamarinIos
🌒 Gradient animations on Xamarin-iOS
Stars: ✭ 17 (-91.46%)
Mutual labels:  xamarin

Apache Parquet for .NET NuGet Nuget

Icon


Fully portable, managed .NET library to read and write Apache Parquet files. Supports .NET 6.0, .NET 5.0, .NET Core 3.1 (LTS), .NET Core 2.1 (LTS), .NET Standard 1.4 and up.

Runs everywhere .NET runs Linux, MacOS, Windows, iOS, Android, Tizen, Xbox, PS4, Raspberry Pi, Samsung TVs and much more.

Support Web Assembly is coming (email me if you are interested in details).

Why

Parquet is a de facto physical storage format in big data applications, including Apache Spark, as well as newly emerging Delta Lake and lakehouse architectures. It's really easy to read and write data if you are using one of those platforms, however in standalone mode it's almost impossible or involves using heavy engines. Parquet.Net is very small, fast, pure managed implementation that is crazy fast.

Index

You can track the amount of features we have implemented so far.

Getting started

Parquet.Net is redistributed as a NuGet package. All the code is managed and doesn't have any native dependencies, therefore you are ready to go after referencing the package. This also means the library works on Windows, Linux and MacOS X (including M1).

General

This intro is covering only basic use cases. Parquet format is more complicated when it comes to complex types like structures, lists, maps and arrays, therefore you should read this page if you are planning to use them.

Reading files

In order to read a parquet file you need to open a stream first. Due to the fact that Parquet utilises file seeking extensively, the input stream must be readable and seekable. You cannot stream parquet data! This somewhat limits the amount of streaming you can do, for instance you can't read a parquet file from a network stream as we need to jump around it, therefore you have to download it locally to disk and then open.

For instance, to read a file c:\test.parquet you would normally write the following code:

using System.Collections.Generic;
using System.IO;
using System.Linq;
using Parquet.Data;

// open file stream
using (Stream fileStream = System.IO.File.OpenRead("c:\\test.parquet"))
{
   // open parquet file reader
   using (var parquetReader = new ParquetReader(fileStream))
   {
      // get file schema (available straight after opening parquet reader)
      // however, get only data fields as only they contain data values
      DataField[] dataFields = parquetReader.Schema.GetDataFields();

      // enumerate through row groups in this file
      for(int i = 0; i < parquetReader.RowGroupCount; i++)
      {
         // create row group reader
         using (ParquetRowGroupReader groupReader = parquetReader.OpenRowGroupReader(i))
         {
            // read all columns inside each row group (you have an option to read only
            // required columns if you need to.
            DataColumn[] columns = dataFields.Select(groupReader.ReadColumn).ToArray();

            // get first column, for instance
            DataColumn firstColumn = columns[0];

            // .Data member contains a typed array of column data you can cast to the type of the column
            Array data = firstColumn.Data;
            int[] ids = (int[])data;
         }
      }
   }
}

Writing files

Writing operates on streams, therefore you need to create it first. The following example shows how to create a file on disk with two columns - id and city.

//create data columns with schema metadata and the data you need
var idColumn = new DataColumn(
   new DataField<int>("id"),
   new int[] { 1, 2 });

var cityColumn = new DataColumn(
   new DataField<string>("city"),
   new string[] { "London", "Derby" });

// create file schema
var schema = new Schema(idColumn.Field, cityColumn.Field);

using (Stream fileStream = System.IO.File.Create("c:\\test.parquet"))
{
   using (var parquetWriter = new ParquetWriter(schema, fileStream))
   {
      // create a new row group in the file
      using (ParquetRowGroupWriter groupWriter = parquetWriter.CreateRowGroup())
      {
         groupWriter.WriteColumn(idColumn);
         groupWriter.WriteColumn(cityColumn);
      }
   }
}

Row-Based Access

There are API for row-based access that simplify parquet programming at the expense of memory, speed and flexibility. We recommend using column based approach when you can (examples above) however if not possible use these API as we constantly optimise for speed and use them internally ourselves in certain situations.

Who?

and many more. Want to be listed here? Just raise a PR.

Contributions

Are welcome in any form - documentation, code, reviews, donations.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].