Exemplo n.º 1
0
 /// <summary>
 /// Reads <see cref="DataSet"/> from an open stream
 /// </summary>
 /// <param name="source">Input stream</param>
 /// <param name="formatOptions">Parquet options, optional.</param>
 /// <param name="readerOptions">Reader options, optional</param>
 /// <returns><see cref="DataSet"/></returns>
 public static DataSet Read(Stream source, ParquetOptions formatOptions = null, ReaderOptions readerOptions = null)
 {
     using (var reader = new ParquetReader(source, formatOptions, readerOptions))
     {
         return(reader.Read());
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Reads the file
 /// </summary>
 /// <param name="fullPath">The full path.</param>
 /// <param name="formatOptions">Optional reader options.</param>
 /// <param name="readerOptions">The reader options.</param>
 /// <returns><see cref="DataSet"/></returns>
 public static DataSet ReadFile(string fullPath, ParquetOptions formatOptions = null, ReaderOptions readerOptions = null)
 {
     using (Stream fs = System.IO.File.OpenRead(fullPath))
     {
         using (var reader = new ParquetReader(fs, formatOptions, readerOptions))
         {
             return(reader.Read());
         }
     }
 }