Prerequisites
You’ll need:- C++17 compatible compiler (GCC 7+, Clang 6+, MSVC 2017+)
- CMake 3.16 or higher
- Basic familiarity with C++ and CMake
Create Your First Arrays
Arrows use builders to create arrays. Each data type has its own builder class.Create a file called Key concepts:
arrow_basics.cc:Int8Builder- Creates arrays of 8-bit integersAppendValues()- Adds multiple values at onceFinish()- Completes the array and returns itARROW_ASSIGN_OR_RAISE- Macro for error handling
Read and Write CSV Files
Arrow provides fast CSV reading and writing capabilities.Create Now read and process it:
test.csv:Complete Example
Here’s a complete working example that ties everything together:Next Steps
Compute Functions
Learn about Arrow’s compute functions for data processing
Parquet Files
Read and write Parquet files with Arrow
Datasets
Work with multi-file datasets and partitioning
API Reference
Explore the complete C++ API documentation
Common Patterns
Error Handling
Arrow uses macros for consistent error handling:Memory Management
Arrow usesstd::shared_ptr for automatic memory management:
Working with Nulls
Troubleshooting
CMake can't find Arrow
CMake can't find Arrow
Make sure Arrow is installed and set
CMAKE_PREFIX_PATH:Linking errors
Linking errors
Ensure you’re linking against the correct Arrow libraries:
Runtime errors loading shared libraries
Runtime errors loading shared libraries