https://github.com/amoeba/arrow-cpp-csv-examples
Short demonstration of Apache Arrow's CSV readers
https://github.com/amoeba/arrow-cpp-csv-examples
apache-arrow arrow cplusplus cpp
Last synced: 10 months ago
JSON representation
Short demonstration of Apache Arrow's CSV readers
- Host: GitHub
- URL: https://github.com/amoeba/arrow-cpp-csv-examples
- Owner: amoeba
- License: apache-2.0
- Created: 2022-10-19T23:01:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-17T19:47:39.000Z (over 1 year ago)
- Last Synced: 2025-08-04T13:36:31.656Z (10 months ago)
- Topics: apache-arrow, arrow, cplusplus, cpp
- Language: C++
- Homepage:
- Size: 171 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# arrow-cpp-csv-examples
Short demonstrations of using [Arrow](https://arrow.apache.org)'s two methods of reading in CSV file as Arrow Data:
1. [TableReader](https://arrow.apache.org/docs/cpp/api/formats.html#_CPPv4N5arrow3csv11TableReaderE)
2. [StreamingReader](https://arrow.apache.org/docs/cpp/api/formats.html#_CPPv4N5arrow3csv15StreamingReaderE)
Written up mostly as an example for myself but may be useful for others. See the [Arrow C++ docs](https://arrow.apache.org/docs/cpp/csv.html) for more information.
## Running
### Pre-requisites
- `pkg-config` (`brew install pkg-config`)
- A >=C++11 compiler (e.g., clang 14)
- Arrow C++ headers (`brew install apache-arrow`)
## Compile
A `Makefile` is provided to make compiling both examples a single command:
```sh
make
```
## Run
- TableReader:
```sh
./table_reader_example
```
- StreamingReader:
```sh
./streaming_reader_example
```