Re:Show HN: Simplql - Query csv, xls and json files with SQL
by luckman212 on Saturday January 16, 2021 @11:11PM
(#25808035)
Related 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"
Re:Show HN: Simplql - Query csv, xls and json files with SQL
by chanar on Monday January 18, 2021 @04:54PM
(#25827126)
Thank 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
Re:Show HN: Simplql - Query csv, xls and json files with SQL
by majkinetor on Friday January 15, 2021 @09:29AM
(#25791300)
Tools 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.
Re:Show HN: Simplql - Query csv, xls and json files with SQL
by chanar on Friday January 15, 2021 @03:03PM
(#25795597)
Files 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.
[0]: https://github.com/johnkerl/miller
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"}}]
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!
- 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.
On Windows:
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.