title: Write C++ data to Apache Parquet: ParquetFileWriter or Write Arrow Table?
body: <p>I'm looking for the proper way to write data to a Parquet file in Cpp/C++. It seems like there are two choices: either writing direct to Parquet or writing to Arrow then Parquet.</p>
  <p>Is writing to Arrow then converting to Parquet with WriteTable preferred? Would either performance considerations or ease of use drive one to write directly to Parquet with the ParquetFileWriter or some other tool?</p>
  <p>Looking first at the code it seemed like the <a href="https://github.com/apache/arrow/blob/master/cpp/src/parquet/file_writer.h" rel="nofollow noreferrer">ParquetFileWriter</a> was the proper bet. But the <a href="https://github.com/apache/arrow/blob/master/cpp/src/parquet/file_serialize_test.cc" rel="nofollow noreferrer">usage in the unittest</a> seemed clunky.</p>
  <p>Then I <a href="https://arrow.apache.org/docs/cpp/parquet.html" rel="nofollow noreferrer">found the docs which say to use the WriteTable</a> free fn. WriteTable takes an Apache Arrow Table so it seems I must write to that first. I was taken aback at first because then I must open the lid on Arrow.</p>