Airport for DuckDB

A duck at the airport.

The Airport extension brings Arrow Flight support to DuckDB, enabling DuckDB to query, modify, and store data via Arrow Flight servers. A DuckDB extension is a plugin that expands DuckDB’s core functionality by adding new capabilities.

To understand the rationale behind the development of this extension, check out the motivation for creating the extension.

Getting started

The Airport extension is a DuckDB community extension. To install it, run the following SQL inside DuckDB:

INSTALL airport FROM community;

To load the extension you can then execute:

LOAD airport;

As a simple demonstration of what Airport can do try the following SQL:

-- Install the Airport extension and then load it into DuckDB
INSTALL airport from community;
LOAD AIRPORT;

-- Attach a database named 'hello'
ATTACH 'hello' (TYPE  AIRPORT, location 'grpc+tls://hello-airport.query.farm');

-- Jump into a static schema
USE hello.static;

-- First query using a join of two Airport tables.
SELECT
 greeting || ', ' || first_name || ' welcome to the Airport extension.' AS greeting
FROM greetings, people
WHERE people.language = greetings.language limit 3;
┌──────────────────────────────────────────────────┐
│                     greeting                     │
varchar
├──────────────────────────────────────────────────┤
│ Hello, James welcome to the Airport extension.   │
│ Hola, Carlos welcome to the Airport extension.   │
│ Bonjour, Émile welcome to the Airport extension. │
└──────────────────────────────────────────────────┘

-- This hello database server also provides a simple way to chat with others using it,
-- via INSERT and SELECT, and also DELETE and UPDATE.
use hello.chat;

-- First lets get our identity (this is generated by the server automatically)
SELECT * FROM identity;
┌─────────────┐
│    name     │
varchar
├─────────────┤
│ zesty-chick │
└─────────────┘

INSERT INTO messages (channel, message) VALUES ('airport', 'This is my first message');

-- Our message is there.
SELECT * FROM messages WHERE channel = 'airport' order by timestamp desc;
┌───────┬─────────────┬──────────────────────────┬─────────────────────────┬─────────┐
id   │   sender    │         message          │        timestamp        │ channel │
│ int64 │   varcharvarchar          │      timestamp_ms       │ varchar
├───────┼─────────────┼──────────────────────────┼─────────────────────────┼─────────┤
0   │ zesty-chick │ This is my first message │ 2025-07-22 02:31:47.714 │ airport │
└───────┴─────────────┴──────────────────────────┴─────────────────────────┴─────────┘

If you wish to build the extension from source see these instructions.

What can I do with the Airport extension that I can’t do with DuckDB now?

With the Airport extension you can:

  • Query data that DuckDB can’t normally access—either because it’s non-tabular or in an unsupported format. Even external APIs. It all depends what the server allows.
  • Add custom scalar or table returning SQL functions not available in DuckDB.
  • Provide User Defined Functions (UDFs) for DuckDB that execute remotely.
  • Serve data with fine-grained access control, filtering both rows and columns based on user permissions.
  • Access and provide Data-as-a-Service.

What is Arrow Flight?

Apache Arrow Logo

From the Apache Arrow Documentation:

Arrow Flight is an RPC framework for high-performance data services based on Apache Arrow and is built on top of gRPC and the Arrow IPC format.

Flight is organized around streams of Arrow record batches1, being either downloaded from or uploaded to another service. A set of metadata methods offers discovery and introspection of streams, as well as the ability to implement application-specific methods.

Methods and message wire formats are defined by Protobuf, enabling interoperability with clients that may support gRPC and Arrow separately, but not Flight. However, Flight implementations include further optimizations to avoid overhead in usage of Protobuf (mostly around avoiding excessive memory copies).

What is an Apache Arrow “Flight”?

An Apache Arrow flight (hereafter referred to simply as a “flight”) is a source or destination for data that is accessible via the Apache Arrow Flight RPC framework. Each flight has a schema and one or more endpoints, that may offer one or more locations.

You can think of flights to be simliar to be a collection of files that share the same schema or even more apt a database table that is stored on a remote server. Apache Arrow Flight servers often provide many different flights.

How does Airport work with DuckDB?

Airport is an extension written in C++ for DuckDB version 1.3.0 or later, it utilizes the Apache Arrow library.

How can I build an Arrow Flight Server?

Start by reading the basics of implementing an Arrow Flight Server.

Conference Presentations

Rusty Conover presented the Airport extension in a presentation titled “Airport For DuckDB: Letting DuckDB take flight.” at DuckCon #6.

Fly High with Airport and DuckDB ✈️

Stay connected with Airport — get the latest data source integrations, SQL tips, and project news delivered right to your inbox. We only send updates when there’s something truly exciting.

Footnotes

  1. A record batch is a collection of equal-length arrays that all match a schema.↩︎