Skip to content

QuickParquetLoad

Cinchoo edited this page Feb 26, 2021 · 5 revisions

Loading Parquet file

To load Parquet file, use ChoParquetReader component to parse it. Sample below shows how to load Parquet file (Emp.parquet)

Load using iterator

foreach (dynamic e in new ChoParquetReader("Emp.parquet"))
    Console.WriteLine("Id: " + e.Id + " Name: " + e.Name);

Load using loop

var reader = new ChoParquetReader("Emp.parquet");
dynamic rec;
 
while ((rec = reader.Read()) != null)
    Console.WriteLine("Id: " + e.Id + " Name: " + e.Name);

Load using POCO object

public class Employee
{
    public int Id { get; set; }
    public string Name { get; set; }
}
foreach (var e in new ChoParquetReader<Employee>("Emp.parquet"))
    Console.WriteLine("Id: " + e.Id + " Name: " + e.Name);