How to convert a CSV file to Parquet using C#

With Cinchoo ETL - an open source library, you can convert CSV file to Parquet easily.

Install Nuget package

install-package ChoETL.Parquet

Sample code

using ChoETL;

string csv = @"Id, Name
1, Tom
2, Mark";

using (var r = ChoCSVReader.LoadText(csv)
    .WithFirstLineHeader()
    .WithMaxScanRows(2)
    .QuoteAllFields()
    )
{
    using (var w = new ChoParquetWriter("*** Your Parquet file ***"))
    {
        w.Write(r);
    }
}

For more information, please visit codeproject article.