Tablas — CSV, Parquet, SQLite, DuckDB & Excel Viewer for VS Code
Open data files in a pretty, theme-aware table view — right inside VS Code, no leaving the editor.
Vision
VS Code has no first-class way to look at structured data files. JetBrains editors (DataGrip, IntelliJ's built-in CSV/table viewer) get this right: open a data file, see a real table, search it, tweak a cell, done. Tablas aims to bring that experience to VS Code.
Where we are: read-only viewing for CSV, Parquet, SQLite (.db/.sqlite/.sqlite3), DuckDB (.duckdb/.ddb), and Excel (.xlsx) files — parse → render as <table>, theme-aware, XSS-safe. SQLite/DuckDB databases and Excel workbooks all get a dropdown to switch between their tables/views or sheets. Every column header shows a profile — type, null share, and a mini histogram (or distinct count for text) — with a detail card on click (nulls, distinct, min/max/mean, full histogram). Everything is computed over the whole table, not just the rows shown. Every column also has a filter box under its header — type text to match, or use =x, !x, >10, <=2024-01-01, = (empty) — and filters run over the whole table too, in every format. Alt+click a cell to filter by its value.
For dbt + DuckDB (dbt-duckdb) developers: the build-and-look loop works inside VS Code. A DuckDB file refreshes by itself when dbt build finishes (your table, filters and scroll stay), tables in every schema (staging, marts, …) are in the picker with approximate row counts, a Table | SQL switch runs read-only queries against the file, and on a model's .sql file Tablas: Preview dbt Model (editor title bar, right-click menu, or the command palette) opens the DuckDB file on the table that model built. When the project has a target/manifest.json, column descriptions from your dbt docs show in the header tooltips and the column details card.
Where we're going, roughly in order:
- Column sorting — click a header to sort the whole table, not just the rows on screen.
- Find within a file — locate matching cells in the currently open table (JetBrains-style in-table search, not just VS Code's text-based Ctrl+F, which doesn't work well on a rendered table). Per-column filtering is already here.
- Basic in-place editing — edit a cell and persist it back to the source file. This is the point where the editor stops being
CustomReadonlyEditorProvider and needs real document/edit-model semantics (undo/redo, dirty state, save).
Settings and commands
|
|
tablas.maxRows |
Rows loaded per file, and the most a filter, SQL query or table switch shows (default 5000). |
tablas.autoRefresh |
Re-read a DuckDB file automatically when it changes on disk (default on). |
Tablas: Refresh |
Re-read the open DuckDB file now (also the ↻ toolbar button). |
Tablas: Preview dbt Model |
On a dbt model's .sql file: open the DuckDB file on the table it built. |
Current status
CSV, Parquet, SQLite, DuckDB, and Excel (.xlsx), read-only. Requires VS Code 1.90 or newer. Install it from the Visual Studio Marketplace (search for Tablas, publisher gerardovitale); it works in untrusted workspaces too, except that a workspace cannot change tablas.maxRows. To build from source, npm run install:local packages the extension and installs it into your VS Code. See CLAUDE.md for architecture and how the pieces fit together if you're changing code here.
Development
npm run compile # build both bundles (extension + webview)
npm run lint # eslint (includes a project rule banning innerHTML assignment)
npm run check-types # tsc --noEmit
npm run test:unit # fast unit tests + c8 coverage report, no Electron
npm test # full suite: compile + typecheck + vscode-test (unit + integration)
npm run install:local builds, tests, packages, and installs the extension into your local VS Code. Releases are built per platform and published from GitHub Actions; see PUBLISHING.md (or scripts/install-local.sh --publish-help) for the steps.
Test gates
npm install installs husky git hooks:
- pre-commit:
lint + check-types + test:unit — fast, no Electron.
- pre-push: full
npm test, including the Electron-backed integration suite.
On GitHub, .github/workflows/package.yml runs lint, type checks and the unit tests on every push, and builds and smoke-tests one .vsix per platform.
Coverage (npm run test:unit, via c8, config in .c8rc.json) only instruments the unit suite. src/csvEditorProvider.ts and src/extension.ts are explicitly excluded from it: both import 'vscode', a module that only exists inside a real Extension Development Host, so they can only ever be exercised by the integration suite (which c8 can't instrument — it runs in a separate Electron process). Everything else under src/ uses all: true, so a new unit-testable file with no tests shows up as 0% rather than being silently absent from the report.