Skip to content

DuckDB Extension

Airport

Attach an Arrow Flight server as a DuckDB catalog. Query its tables with SQL and join remote results with local data.

1,622,394
extension loads · last 90 days
On this page

Query a service that speaks Arrow Flight

Apache Arrow Flight is a protocol for moving table data between services. Airport lets DuckDB attach a Flight server as a database, discover the tables it exposes, and query those tables with SQL.

Use it when your data provider already offers a Flight endpoint, or when you want to serve application data from your own Flight server. Remote results can be joined with local DuckDB tables. You need a running Flight service; the example uses a public demo server.

Example

Query the public Flight demo

The demo server supplies greetings and people. This query reads a few greetings without creating or changing remote data.

Before you run it: Allow network access to the public demo at hello-airport.query.farm. Availability depends on that service.

Tested with DuckDB 1.5.6. Run this example in the DuckDB CLI or a native client.

SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
  WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL airport FROM query_farm;
LOAD airport FROM query_farm;

ATTACH 'hello' AS qf_airport_demo (
  TYPE airport, LOCATION 'grpc+tls://hello-airport.query.farm'
);
SELECT greeting || ', ' || first_name AS greeting
FROM qf_airport_demo.static.greetings AS g
JOIN qf_airport_demo.static.people AS p ON p.language = g.language
ORDER BY greeting
LIMIT 3;
DETACH qf_airport_demo;

The rows depend on the live demo. Your own server determines which catalogs, tables, and operations Airport can expose.

Common tasks

Deep Dive

Technical Details

Reference

Extension Contents

Quick reference to all available functions and settings organized by category.

Arrow Flight Catalog
airport Object type: Catalog Attach an Arrow Flight server as a DuckDB catalog.
Arrow Flight Connection
airport Object type: Secret Connection details for an Arrow Flight server.
Diagnostics
airport_user_agent() Object type: Scalar function Returns the User-Agent header string Airport sends with Arrow Flight requests.
airport_version() Object type: Scalar function Returns the version string of the loaded Airport extension.
Discovery
airport_databases() Object type: Scalar function Lists the databases an Arrow Flight server advertises through its __databases flight.
airport_flights() Object type: Table function Lists the flight descriptors offered by an Arrow Flight server, with their schemas and metadata.
Operations
airport_action() Object type: Table function Invokes a custom Flight Action on the server (the Arrow Flight RPC for non-query operations).
airport_take_flight() Object type: Table function Fetches the result of a specific Arrow Flight ticket as a DuckDB table.

API Reference

Function Reference

Database Storage

Storage Extensions

Catalog implementations that attach external storage as a DuckDB database.

airport

Description
Parameters
Parameter Type Required Description
location VARCHAR Optional Optional Arrow Flight server URI override (e.g. grpc://host:8815 or grpc+tls://host:8815). When omitted, the URL passed as the database identifier in ATTACH '<url>' AS <alias> is used.
auth_token VARCHAR Optional Bearer token sent in the gRPC Authorization header. Recommended via CREATE SECRET rather than inline so it's not stored in query text.
Examples
1
-- 1. Stash credentials once. `scope` is the URL prefix the secret applies to.
CREATE SECRET my_flight (
  TYPE airport,
  scope 'grpc+tls://flight.example.com:8815',
  auth_token :token
);

-- 2. Attach the URL — the Secrets Manager picks up `my_flight`
--    automatically because the URL matches its scope.
ATTACH 'grpc+tls://flight.example.com:8815' AS remote (TYPE airport);

-- 3. Query as if it were local
SELECT user_id, COUNT(*) AS events
FROM remote.public.activity
WHERE ts >= CURRENT_DATE - 7
GROUP BY user_id;
2
ATTACH 'grpc://localhost:8815' AS remote (TYPE airport);

SHOW TABLES FROM remote.public;
3
ATTACH 'grpc+tls://flight.example.com:8815' AS remote (TYPE airport);

INSERT INTO remote.public.events
SELECT user_id, event_type, ts
FROM staging.new_events;

UPDATE remote.public.profile
  SET country = 'CA'
  WHERE user_id = 12345;

Security

Secrets

DuckDB secrets for storing the credentials and keys used by the airport extension.

airport

Description
Parameters
Parameter scope Type VARCHAR Required Required Description Arrow Flight server URI, e.g. grpc://host:8815 or grpc+tls://host:8815. The DuckDB Secrets Manager matches ATTACH / function calls to a secret by URL prefix against this value.
Parameter auth_token Type VARCHAR Required Optional Description Bearer token sent in the gRPC Authorization header.
Examples
1

Create a secret for a TLS-protected Flight server

CREATE SECRET my_flight (
  TYPE airport,
  scope 'grpc+tls://flight.example.com:8815',
  auth_token 'your-token'
);
2

Attach the database — the matching secret is picked up automatically by URL scope

ATTACH 'grpc+tls://flight.example.com:8815' AS remote (TYPE airport);
SELECT * FROM remote.public.events LIMIT 10;

Practical Examples

Cookbook

Real-world recipes and patterns for common use cases.

Platform Support

Compatibility

Extension availability may vary by platform and DuckDB version. Check below to ensure this extension supports your environment before installation.

Quick Facts

Release status Stable
Software License MIT
Pricing Free
Written In C++
Source Available Yes
View on GitHub
Usage
1,622,394
loads · last 90 days

Platforms

DuckDB 2.0.0

  • Linux x86_64aarch64
  • Linux (musl) Not available
  • macOS Apple Silicon
  • Windows x86_64x86_64 (MinGW)
  • WASM Not available
Compiled binary sizes
Platform Architecture Size
Linux x86_64 29.67 MB
Linux aarch64 26.41 MB
macOS Apple Silicon 20.57 MB
Windows x86_64 18.20 MB
Windows x86_64 (MinGW) 31.35 MB

Compressed download sizes for the release shown above.

DuckDB & Haybarn

Release calendar
  • DuckDB v2.0.0 Query.Farm repository Supported
  • Haybarn v1.5.6 Built-in community repository Supported

Browser examples use Haybarn-Wasm 2.0.0-rc12.

Checked .