Skip to content
DuckDB community extension

arrow

This extension is an alias to the nanoarrow extension. Allows the consumption and production of the Apache Arrow interprocess communication (IPC) format, both from files and directly from stream buffers.

01 / SETUP

Install and load

Run these commands in a Haybarn SQL session. The extension is available from the community repository.

Haybarn 2.0.0 · SQL
INSTALL arrow FROM community;
LOAD arrow FROM community;

Try it in a temporary SQL session with arrow already loaded. Queries run in this tab; examples using files or services need their own setup.

Using upstream DuckDB? Follow the maintainer’s installation instructions.

02 / QUERY

Usage example

Read from a file in Arrow IPC format

SQL
-- Read from a file in Arrow IPC format
FROM 'arrow_file.arrow';
FROM 'arrow_file.arrows';
FROM read_arrow('arrow_file.arrow');

-- Write a file in Arrow IPC stream format
CREATE TABLE arrow_libraries AS SELECT 'nanoarrow' as name, '0.6' as version;
COPY arrow_libraries TO 'test.arrows' (FORMAT ARROWS, BATCH_SIZE 100);

-- Write to buffers: This returns IPC message BLOBs and indicates which one is the header.
FROM to_arrow_ipc((FROM arrow_libraries));

Provided by duckdb. Not yet verified on Haybarn 2.0.0.

Sample data & setup

About this extension

The Arrow IPC library allows users to read and write data in the Arrow IPC stream format. This can be done by either reading and producing .arrow files or by directly reading buffers using their pointers and sizes. It is important to note that reading buffers is dangerous, as an incorrect pointer can crash the database system. This process is temporary and will be deprecated in the future, as clients (e.g., the Python DuckDB client) will have a function that internally extracts these buffers from an Arrow stream.

Project overview from the community descriptor.

Documentation and resources

Project and build details
Repository
duckdb/duckdb-extension-alias
License
MIT
Maintainers
pdet
Written in
C++
Build source
7e7a9c0dd16a
Build definition
Community descriptor