[Feat]: Import data from file (CSV/TSV/JSON)

Chiusa
#484 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Detoy ci sta già lavorando.

Dal 12/10/2026.

  • #1023 di @Detoy — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust, typescript
Ambito
database

Direzione di ricerca

Start by reading the existing clipboard import modal and the frontend parse, infer, preview, and execute flow; the issue names execute_clipboard_import as the Rust-side entry point. Trace how the modal receives clipboard content and how the file picker can feed the same pipeline, including the proposed size warning. Done means file import works for the listed formats through the existing preview and execution flow, with a warning for large files.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Prerequisites
  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal

Add "Import from file…" as a data source for table imports, alongside the existing clipboard import.

The clipboard import modal is already a full-featured import pipeline: format detection (TSV / CSV / JSON array / Markdown table), type inference with confidence levels, schema editor, data preview, create/append modes with fail/append/replace strategies, mapping to existing columns and ALTER TABLE ADD COLUMN for new ones — all driver-agnostic on the Rust side (execute_clipboard_import goes through the driver trait, so plugins work too).

The only missing piece is the data source: today the modal can only read from the clipboard, which is not a workable flow for actual files.

Proposed v1 (small):

  • A file picker (.csv, .tsv, .json, .md) feeding the file content into the existing parse → infer → preview → execute pipeline;
  • the modal becomes a generic "Import data" modal with two sources (clipboard / file);
  • a size guard with a warning above ~10–20 MB, since parsing happens in the frontend.

Follow-up v2 (large files):

  • Rust-side streaming CSV parsing (the csv crate is already a dependency for export) with batched inserts, progress events and cancellation — mirroring the existing streaming export pipeline;
  • switch inserts to prepared statements / multi-row batches for throughput;
  • fix the frontend CSV parser to support quoted cells containing newlines (it currently splits on \n before parsing — fine for clipboard content, not for real-world CSV files).
Motivation

Tabularis can export result sets to CSV/JSON files (and soon Markdown), but there is no way to import a file into a table — the asymmetry is surprising for users coming from other DB tools. Loading a CSV into a new or existing table is one of the most common day-to-day tasks.

Example

Table context menu / explorer → "Import data…" → pick users.csv → same schema/preview screen as the clipboard import → rows inserted with create-table or append.


Happy to work on a PR (v1 first) if there's interest.

Lingua principale
TypeScript
Stelle
5.1k
Fork
335
Merge medio
1g 10h
PR unite (30g)
268

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TabularisDB/tabularis

Tutte le issue di TabularisDB/tabularis

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.