Skip to content

Airport

ATTACH an Arrow Flight server as a DuckDB catalog and query it in SQL.

2,323,964
extension loads · last 90 days
On this page

Deep Dive

Technical Details

Install

INSTALL airport FROM community;
LOAD airport;

Quick Start

Attach a remote Arrow Flight database

-- `scope` matches the secret to the URL you ATTACH against.
CREATE SECRET my_flight (
  TYPE airport,
  scope 'grpc+tls://flight.example.com:8815',
  auth_token 'your-token'
);

ATTACH 'grpc+tls://flight.example.com:8815' AS remote (TYPE airport);

Query it as if it were local

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

ATTACH 'grpc+tls://flight.example.com:8815' AS remote (TYPE airport);

SELECT * FROM remote.public.events LIMIT 100;

Inspect available flights from a server

SELECT * FROM airport_flights('grpc+tls://flight.example.com:8815');

Reference

Extension Contents

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

Name Description
Arrow Flight Catalog
airport Attach an Arrow Flight server as a DuckDB catalog.
Arrow Flight Connection
airport Connection details for an Arrow Flight server.
Diagnostics
airport_user_agent() Returns the User-Agent header string Airport sends with Arrow Flight requests.
airport_version() Returns the version string of the loaded Airport extension.
Discovery
airport_databases() Lists databases exposed by the Arrow Flight server identified by the given secret.
airport_flights() Lists the flight descriptors offered by an Arrow Flight server, with their schemas and metadata.
Operations
airport_action() Invokes a custom Flight Action on the server (the Arrow Flight RPC for non-query operations).
airport_take_flight() Fetches the result of a specific Arrow Flight ticket as a DuckDB table.

API Reference

Function Documentation

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
2,323,964
loads · last 90 days

Platforms

  • Linux x86_64 aarch64
  • Linux (musl) Not available
  • macOS Intel Apple Silicon
  • Windows x86_64
  • WASM Not available
Compiled binary sizes
Platform Architecture Size
Linux x86_64 24.56 MB
Linux aarch64 22.76 MB
macOS Intel 16.73 MB
macOS Apple Silicon 15.58 MB
Windows x86_64 14.77 MB

Compressed download size from the Haybarn extension repository.

DuckDB & Haybarn

Release calendar