Skip to main content

Hugr App Data Source

The hugr-app data source type connects hugr to external applications via the DuckDB Airport extension (Arrow Flight gRPC protocol).

Unlike other data sources, hugr-app sources are self-registering — the application connects to hugr and registers itself. You don't need to manually configure them.

How It Works

  1. The app starts a gRPC server (Airport protocol)
  2. The app calls hugr's API to register as a data source
  3. Hugr attaches via ATTACH ... (TYPE AIRPORT)
  4. Hugr reads the app's catalog (functions, tables) and compiles into GraphQL
  5. Heartbeat monitor detects crashes and auto-recovers

Configuration

Hugr-app sources are registered automatically by the application. The stored configuration in CoreDB:

FieldValue
typehugr-app
pathgrpc://host:port?secret_key=TOKEN&version=X.Y.Z
as_moduletrue
self_definedtrue

Server-Side Settings

Environment VariableDescriptionDefault
HUGR_APP_HEARTBEAT_INTERVALHealth check interval30s
HUGR_APP_HEARTBEAT_TIMEOUTPer-check timeout10s
HUGR_APP_HEARTBEAT_RETRIESFailures before suspend3

Building Apps

See the Hugr Apps section for the complete developer guide.