local/tools
data / Native app / v1.0.4

CSV SQL Query

Run SQL on CSV, TSV, JSON, Parquet and log files (nginx, Apache, syslog) with DuckDB.

Install

  • install
    irm https://raw.githubusercontent.com/chayprabs/localtools/main/csv-sql-query/install.ps1 | iex
  • update
    localtools-csv-sql-query update
  • remove
    localtools-csv-sql-query uninstall

Opens at http://127.0.0.1:47105 in your browser. Run localtools-csv-sql-query --help for the command line. Set LOCALTOOLS_NO_OPEN=1 to install without opening it.

Direct download

PlatformFileSize
Windows x64csv-sql-query-1.0.4-windows-x64.zip32.3 MB
macOS Apple Siliconcsv-sql-query-1.0.4-macos-arm64.zip30.2 MB
macOS Intelcsv-sql-query-1.0.4-macos-x64.zip33.3 MB
Linux x64csv-sql-query-1.0.4-linux-x64.zip39.8 MB
Linux ARM64csv-sql-query-1.0.4-linux-arm64.zip36.0 MB

SHA-256 checksums are in the release notes; the install scripts verify them for you.

See it

How to use

  1. Run localtools-csv-sql-query (or open CSV SQL Query from your app menu); it opens in your browser.
  2. Drop one or more files: CSV, TSV, JSON/JSONL, Parquet, XLSX, SQLite, or nginx/Apache/syslog logs. Each becomes a table named after the file, with its columns and types listed.
  3. Write SQL (DuckDB dialect) or click one of the example queries built from your columns, then press Run or Ctrl+Enter.
  4. Page through the result, check the plan with Explain or Explain analyze, and download the result as CSV, JSON, Parquet or XLSX.
  5. From a terminal: localtools-csv-sql-query query "SELECT ..." data.csv logs/access.log -o out.parquet, or localtools-csv-sql-query shell data.csv for an interactive DuckDB shell.

FAQ

How big can the files be?

Multi-gigabyte files work: DuckDB streams them and spills to disk. On a Windows laptop a 1 GB, 12-million-row CSV counts in 1.9 s and a GROUP BY with COUNT DISTINCT takes 1.2 s using under 1 GB of memory. In the browser, results of any size are paged 200 rows at a time.

Which log formats are understood?

nginx and Apache access logs (combined and common), syslog in RFC 3164 (with or without <PRI>, classic or RFC 3339 timestamps) and RFC 5424, and JSON-lines logs. They become typed tables (status INTEGER, time TIMESTAMPTZ, ...) with a line_no column; lines that do not match are counted and reported. Any other text file becomes a table of lines.

Can I join files of different formats?

Yes. Every file is a table in the same DuckDB database, so you can join a CSV with a Parquet file, a sheet of an .xlsx and an access log in one query. SQLite and DuckDB files are attached read-only as name.table.

Does my data leave my computer?

No. Everything runs locally with no network access: extension autoloading is off, and in the web UI DuckDB is locked to the uploaded files (it cannot read other paths, fetch URLs or change that setting). Session files are deleted when you close the page.

Why does my query fail with a line and column?

Errors come straight from DuckDB and are mapped to the position in your SQL; the UI selects the offending spot in the editor. For CSV data errors DuckDB reports the line number in the file.