🦆 DuckLake SQL Assistant for VS Code & Jupyter Notebook
A high-performance VS Code extension designed specifically for DuckLake / DuckDB over PostgreSQL Catalog. It provides embedded SQL syntax highlighting, intelligent table/column autocompletion, and schema inspection inside Python string literals and Jupyter Notebook cells.
✨ Features
🎨 Embedded SQL Syntax Highlighting:
Highlights SQL code inside Python triple quotes ("""...""" or '''...''') and single quotes.
Automatically enabled for:
Methods: con.sql("""..."""), duckdb.query(...), cursor.execute(...), etc.
Magic comments: """--sql ...""" or """/*sql*/ ...""".
Smart Heuristic: Any triple quote starting with SQL verbs (SELECT, WITH, INSERT, CREATE, etc.).
Full Jupyter Notebook Support: Works seamlessly inside .ipynb code cells (vscode-notebook-cell) as well as .py files.
⚡ Schema-Aware Autocomplete & Suggestions:
Tables & Views: Suggests tables from your PostgreSQL DuckLake catalog when typing after FROM, JOIN, INTO, etc.
Columns & Data Types:
Dot completion: Typing u. or lake_users. suggests only columns belonging to that table or alias!
General column completion: Suggests columns from tables referenced in your query.
DuckDB Lakehouse Functions: Snippets and completions for read_parquet(...), read_csv(...), date_trunc(...), list_transform(...), quantile_cont(...), etc.
🔍 Rich Hover Documentation:
Hover over any table to view its full schema, column types, and descriptions in a formatted Markdown table.
Hover over any column to see its data type, nullability, default value, and parent table.
🔌 Direct PostgreSQL Catalog Integration:
Connects directly to the PostgreSQL database hosting the DuckLake catalog via pg.
No File Locking Issues: Prevents concurrency locks or DuckDB catalog conflicts.
Auto-refresh background timer with real-time status indicator in the VS Code status bar.
🛠️ Quick Start & Installation
1. Build the Extension
Open a terminal in this directory:
cd C:\Users\theze\.gemini\antigravity\scratch\ducklake-sql-extension
npm install
npm run compile
2. Test in VS Code (Development Mode)
Open this folder in VS Code (File > Open Folder...).
Press F5 (or click Run > Start Debugging).
An Extension Development Host VS Code window will open with the extension loaded.