vmvarela/sql-pipe ? reverse-engineered prompt
Reverse engineered prompt
Build me a small command line tool that lets me run SQL directly on data files without setting up a database.
I want it to read CSV, JSON, NDJSON, YAML, XML, or Parquet from either stdin, local files, or a URL, load the data into an in memory SQLite database, run a query I pass in, and print the results back out. If I give it a file, it should use the file name as the table name, and if I pipe data in, it should use a default table name like t. It should handle simple type guessing, support null values nicely, and show results as clean terminal tables when I am looking at the screen, but keep plain CSV style output when I pipe it onward.
It would also be great if it can save the database to a file for reuse later, and if the input format is unclear, let me specify it. Keep it easy to build and run from the command line, and look up any current library docs online if you need to.
Are you gonna build this?
make sure you review the code using coderabbit