Skip to content

kdb-sqltools

kdb-sqltools is a VS Code driver for SQLTools that connects to kdb+/q over q IPC.

It sends q text to the remote process. It does not translate ANSI SQL to q. Use q, qSQL, and normal q expressions:

select from trade where sym=`AAPL
meta trade
tables `.analytics

Requirements

  • VS Code.
  • SQLTools, the required base extension.
  • A kdb+/q process listening on a TCP port, for example:
q -p 5000

Common workflow

  1. Start q with a port.
  2. Add a SQLTools connection that uses the KDB driver.
  3. Open a .q file.
  4. Run a selection or the current line with Ctrl+Enter or Cmd+Enter.
  5. Inspect the result in the kdb results panel.

The kdb results panel is the default result target. SQLTools' own result grid remains available through explicit commands or the kdb-sqltools.results.target setting.

Documentation map

  • Installation: required extensions and first setup.
  • Connections: local q, SQLTools JSON, namespaces, and connection scope.
  • Running q: commands, keybindings, default target, and SQLTools opt-in.
  • Results panel: selection, sorting, search, hidden columns, virtualization, and result placement.
  • Local data server: opt-in localhost endpoints for the current kdb result panel.
  • Charting: built-in uPlot charting, interactions, eligibility rules, grouping, zoom refinement, and downsampling behavior.
  • Copy and export: supported formats and guardrails.
  • Settings: setting keys, defaults, and practical effects.
  • Troubleshooting: known limits and common failure modes.
  • Feedback: bug reports, feature requests, and general feedback.