Flight SQL is a gRPC-based protocol. Tools that only speak the PostgreSQL or MySQL wire
protocol (
psql, mysql CLI, Navicat) cannot connect. Use DBeaver, the Arrow Flight SQL
JDBC driver, or any ADBC client instead.Enable the endpoint
The listener is disabled by default. Enable the listener inconfig.toml and restart:
Authentication
Flight SQL plugs into MoleSignal’s existing auth system. Two credential styles are accepted in the standard basic-auth handshake:
Account login follows the web UI authentication flow and issues a short-lived session token (JWT).
API token authentication uses the supplied token directly. Clients that send a bearer header
instead of basic auth are also accepted. Both methods scope access to one organization and expose
only that organization’s streams and data.
Choosing an organization (multi-org accounts): the default matches web login and selects the
first organization. To select another organization, append
@<org> to the username, such as
[email protected]@acme, where acme is the organization name, slug, or id.
Two more things to know:
- SSO accounts: OIDC/SAML-only accounts have no local password, so account login cannot work. Use an API token instead.
- Session expiry: the JWT issued by account login expires after the server’s
token_ttl_secs. Requests then fail withUNAUTHENTICATED; DBeaver silently reconnects with saved credentials, so interactive use is unaffected. Long-running ADBC scripts should use a non-expiring API token instead.
DBeaver
DBeaver Community does not bundle a Flight SQL driver — register the Arrow Flight SQL JDBC driver once (about a minute):- Database → Driver Manager → New
- On the Libraries tab, click Add Artifact and paste
org.apache.arrow:flight-sql-jdbc-driver:RELEASE, then Download/Update (or Add File with a locally downloaded driver jar) - Back on Settings: Driver Name
Arrow Flight SQL, Class Nameorg.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver, URL Templatejdbc:arrow-flight-sql://{host}:{port}/?useEncryption=false - New Connection → select the newly created driver → Host: MoleSignal server, Port:
5083 - Username: account email (optionally
email@org), Password: account password — or Usernametoken/ Passwordms_...
molesignal), four schemas (logs, metrics, traces,
extend), and the active organization’s streams as tables.
JDBC
org.apache.arrow:flight-sql-jdbc-driver.
Python (ADBC)
Writing queries
- Qualify tables with the stream type:
logs.nginx,metrics.cpu_usage,traces.checkout,extend.lookup_table. An unqualified name defaults tologs. Fully qualified names including the catalog (molesignal.logs.nginx— the form generated by DBeaver during table browsing) work too. - Read-only:
INSERT/UPDATE/DELETE/ DDL are rejected. - Time window: Flight SQL has no time-range parameter, so the server scans the last
default_lookback_hours(24h by default) for partition pruning. A_timestampfilter in theWHEREclause still applies within that window. To query further back, raisedefault_lookback_hours, or use the HTTP query API which takes an explicit time range. _timestampis returned as a microsecond-precision timestamp column.
Limitations
- Prepared statements work, but parameter binding does not — inline literals instead.
- No transactions (read-only engine).
- PromQL is not available over Flight SQL; use the HTTP API for PromQL.
- Result schema in
FlightInfois empty; clients read the schema from the data stream (DBeaver and ADBC handle this transparently).
GET /api/v1/query/running and can be cancelled with
POST /api/v1/query/{id}/cancel, like any HTTP query.