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. Turn it on 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:| Username | Password | Best for | |
|---|---|---|---|
| Account login | your email | your account password | interactive use (DBeaver, ad-hoc) |
| API token | anything (use token) | ms_... token | automation, scripts, BI services |
@<org> to the username — e.g.
[email protected]@acme where acme is the org’s name, slug, or id.
Two more things to know:
- SSO users: if you sign in through OIDC/SAML you 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 your 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 → pick the driver you just created → Host: your server, Port:
5083 - Username: your email (optionally
email@org), Password: your account password — or Usernametoken/ Passwordms_...
molesignal), four schemas (logs, metrics, traces,
extend), and your org’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— what DBeaver generates when you browse a table) 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 yourWHEREclause 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.