Install libarrow and libparquet.
git clone https://github.com/apache/arrow/
cd arrow/cpp
mkdir release && cd release
# It is important to statically link to boost libraries
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DARROW_BOOST_USE_SHARED:BOOL=Off \
-DARROW_PARQUET=ON
make
sudo make install
tmp_pqt <- tempfile(fileext = ".parquet")
download.file("https://github.com/Teradata/kylo/raw/master/samples/sample-data/parquet/userdata1.parquet",
destfile = tmp_pqt)
arrow:::read_parquet_file(tmp_pqt)
#> # A tibble: 1,000 x 13
#> registration_dttm id first_name last_name email gender ip_address
#> <dttm> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 2016-02-03 16:55:29 1 Amanda Jordan ajor… Female 1.197.201…
#> 2 2016-02-04 02:04:03 2 Albert Freeman afre… Male 218.111.1…
#> 3 2016-02-03 10:09:31 3 Evelyn Morgan emor… Female 7.161.136…
#> 4 2016-02-03 09:36:21 4 Denise Riley dril… Female 140.35.10…
#> 5 2016-02-03 14:05:31 5 Carlos Burns cbur… "" 169.113.2…
#> 6 2016-02-03 16:22:34 6 Kathryn White kwhi… Female 195.131.8…
#> 7 2016-02-03 17:33:08 7 Samuel Holmes shol… Male 232.234.8…
#> 8 2016-02-03 15:47:06 8 Harry Howell hhow… Male 91.235.51…
#> 9 2016-02-03 12:52:53 9 Jose Foster jfos… Male 132.31.53…
#> 10 2016-02-04 03:29:47 10 Emily Stewart este… Female 143.28.25…
#> # … with 990 more rows, and 6 more variables: cc <chr>, country <chr>,
#> # birthdate <chr>, salary <dbl>, title <chr>, comments <chr>
Created on 2018-12-04 by the reprex package (v0.2.1)