Skip to content

Installation

Install SQLTools

Install SQLTools first. This extension depends on it and activates it at runtime.

If SQLTools is missing, kdb-sqltools cannot register the KDB driver.

Install kdb-sqltools

Install the SQLTools kdb Driver extension in VS Code. After installation, reload VS Code if the SQLTools connection assistant does not list the KDB driver immediately.

The extension contributes:

  • The q language id for .q files.
  • SQLTools driver registration under driver id KDB.
  • q run commands in the Command Palette for .q files.
  • The kdb results panel.

Start a local q process

For a local connection, start q with a port:

q -p 5000

That process listens on localhost:5000. Use this connection target in SQLTools:

{
  "name": "local kdb",
  "driver": "KDB",
  "server": "localhost",
  "port": 5000,
  "username": "",
  "password": "",
  "database": ".",
  "connectionTimeout": 30
}

See Connections for where to put this JSON and how database maps to q namespaces.

First run

Open a .q file and run:

til 5

Use Ctrl+Enter on Windows/Linux or Cmd+Enter on macOS. The result should open in the kdb results panel.