How to Read multiple parquet files or a directory using apache arrow in cpp

  apache-arrow, c++, parquet

I am new to apache arrow cpp api.
I want to read multiple parquet files using apache arrow cpp api, similar to what is there in apache arrow using python api(as a table).
However I don’t see any example of it.
I know I can read a single parquet file using :

   arrow::Status st;
   arrow::MemoryPool* pool = arrow::default_memory_pool();
   arrow::fs::LocalFileSystem file_system;
   std::shared_ptr<arrow::io::RandomAccessFile> input = file_system.OpenInputFile("/tmp/data.parquet").ValueOrDie();

   // Open Parquet file reader
   std::unique_ptr<parquet::arrow::FileReader> arrow_reader;
   st = parquet::arrow::OpenFile(input, pool, &arrow_reader);

Please let me know if you have any questions.
Thanks in advance

Source: Windows Questions C++

LEAVE A COMMENT