5 ms·
Show HN: Simplql - Query csv, xls and json files with SQL
- majkinetor 6y agoTools do exist actually - Tad does this for CSV, and much more, like pivots - XLS can be natively queried with SQL with many tools, for example dbeaver - I am not aware of JSON tool, but this is trivially achievable with postgresql by just adding json as only field in the table and then using SQL to query it, even index it. No single tool tho, but you can easily automate any of the above via script and have it locally, without browser which is instant show stopper for any serious work.
- chanar 6y agoThanks! Still, no simple solution to do it quickly. Using additional tools needs some sort of technical knowledge.
- majkinetor 6y agoSort of. On Windows: choco install tad dbeaver postgresql Tad and dbeaver usable ASAP. PostgreSql requires creating empty database and single table once, with json type column, then insert json each time. On the more positive side, you have infinitely more capable features in those tools and standard SQL However, for quick and dirty and ad hoc place, web tool looks like a way to go.
- seektable 6y agoFor CSV/TSV files SeekTable can do various reporting (including pivots) really quickly, naturally just in a few clicks.
- jmsaul 6y agoAwesome!
- mritchie712 6y agoWhere do you store the files once uploaded?
- chanar 6y agoFiles are not stored anywhere - everything works within your browser. When you add a file with 100k rows, it gets added instantly and you are ready to query.
- asyrafql 6y agoThanks for building this ;p
- luckman212 6y agoRelated and definitely worth checking out is miller[0] which the author describes as "like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON" [0]: https://github.com/johnkerl/miller https://github.com/johnkerl/miller
- chanar 6y agoThanks! i will check it out
- gigatexal 6y agoAww man website is down :(
- chanar 6y agoI think I was updating it just when you tried to visit the site :)
- gabrielsroka 6y agoThis looks interesting, but: 1. when you go there, it loads a sample 170,000 row file automatically. Can that be disabled? Maybe add a "Load Sample" button... 2. on mobile, the hamburger menu items ("Read more" and "About") don't work 3. the default SQL is "LIMIT 1000", but only 500 rows show up 4. it'd be nice to be able to press Ctrl+Enter (or some shortcut) instead if clicking "Run query" 5. does it support JSON nested objects? eg [{"profile":{"firstName":"Gabriel"}}]
- chanar 6y agoThank you @gabrielsroka! 1. Good idea! 2. Thanks, will look it over. 3. I limited it on purpose, not to overload html. 4. Didn’t think of it. Good idea! 5. Yes, you should be able to query it by SELECT profile->firstName Thanks for great feedback!