Transform SQL files into interactive notebooks powered by DuckDB.
Sidequery for VSCode is a VSCode extension that turns .sql files into executable notebooks. Write queries in cells separated by semicolons, execute them individually or all at once, and see results in formatted tables. For example:
-- Create table
CREATE TABLE sales (id INT, product VARCHAR, amount DECIMAL);
-- Insert data
INSERT INTO sales VALUES (1, 'Laptop', 999.99), (2, 'Mouse', 29.99);
-- Analyze
SELECT product, SUM(amount) as total FROM sales GROUP BY product;- Open VSCode
- Go to Extensions (⇧⌘X / Ctrl+Shift+X)
- Search for "SideQuery"
- Click Install
# Clone the repository
git clone https://github.com/yourusername/sidequery-vscode.git
cd sidequery-vscode
# Install dependencies
bun install
# Compile the extension
bun run compile
bun run compile:renderer
# Open in VSCode
code .Press F5 to run the extension in a new VSCode window.
- Open any
.sqlfile - It automatically opens as a SQL notebook - Execute queries - Click play button or press
Shift+Enter - View results - Tables appear below each cell
- Run Cell:
Shift+Enter - Run All Cells:
Ctrl+Shift+Enter(Cmd+Shift+Enter on Mac) - Add Cell Below:
Ctrl+Enter(Cmd+Enter on Mac) - Delete Cell:
Ctrl+Shift+D(Cmd+Shift+D on Mac)
For detailed usage examples and tips, see the Usage Guide.
Sidequery for VSCode is very much a work in progress. Today, only DuckDB connections are supported.
- More connection types
- Centralization of secrets
- Visualizations
- Deployment
- Bun (v1.0 or higher)
- VSCode (v1.74.0 or higher)
- DuckDB CLI (installed and in PATH)
# Install dependencies
bun install
# Run tests
bun test
# Watch mode for development
bun run watch# Run all tests
npm test
# Run specific test suites
npm run test:duckdb # DuckDB executor tests
npm run test:arrow # Arrow reader testsWe welcome contributions! Please see our Contributing Guide for details.
DuckDB not found
- Ensure DuckDB is installed and in your PATH
- Download from: https://duckdb.org/docs/installation
Extension not activating
- Check that you're opening a
.sqlfile - Look for errors in Help → Toggle Developer Tools
Query execution fails
- Check SQL syntax (DuckDB documentation)
- Ensure previous DDL statements succeeded
- Check for file permissions on temporary directory
GPL v3 License - see LICENSE file for details