You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accept files as positional arguments. Each file becomes a table named after its basename (sans extension). Stdin remains t.
Examples
# Single file — no more cat
sql-pipe orders.csv 'SELECT * FROM orders WHERE amount > 100'# Multi-file join — the #1 reason people reach for DuckDB
sql-pipe orders.csv customers.csv \
'SELECT c.name, SUM(o.amount) FROM orders o JOIN customers c ON o.cust_id = c.id GROUP BY c.name'# Stdin still works, still called t
cat data.csv | sql-pipe 'SELECT * FROM t'# Mix stdin + files
cat events.csv | sql-pipe users.csv 'SELECT * FROM t JOIN users ON t.uid = users.id'
Acceptance Criteria
Files passed as positional arguments are loaded as tables
Table names are derived from filenames (basename sans extension)
Stdin input is still available as table t
Multi-file joins work correctly
Input format is auto-detected from file extension (see related issue)
File-vs-query disambiguation works (heuristic: if arg is a readable file, treat as input; query is last non-file argument)
-- separator works for disambiguation if needed
All existing tests pass
New tests cover single-file, multi-file, stdin+file, and edge cases
Description
Accept files as positional arguments. Each file becomes a table named after its basename (sans extension). Stdin remains
t.Examples
Acceptance Criteria
t--separator works for disambiguation if neededNotes
args.zigto distinguish file paths from query string