Running SQL
qod sql talks to the FlightSQL edge on :31338, the same plane every other client (DBeaver, Power BI, tpch-load-test) connects to. It runs one statement and exits, or - with no statement argument - drops into an interactive REPL.
One-shot
qod sql "SELECT count(*) FROM lineitem" --tenant acme --pool bi
Against the TPC-H demo bootstrap (tenant=acme, pool=bi, table lineitem in schema main of the acme_tpch tenant-db) this returns a single row. --tenant and --pool override whatever the active profile has stored; if you already ran qod login and it saved a tenant/pool you can usually omit them.
Credentials for the FlightSQL handshake are resolved in this order:
QOD_PASSWORDenvironment variablesql_passwordin the active profile - opt-in;qod loginnever writes it, you set it explicitly if you want to skip the prompt- An interactive prompt, once per invocation
The username (sql_user) comes from qod login, or QOD_USER / the profile. Pass --superuser to send the superuser call header instead of a tenant/pool pair - useful for the admin database connection, or for cross-tenant catalog work:
qod sql "SELECT * FROM acme_tpch.main.lineitem LIMIT 5" --superuser