4 ms·
After CSV files as virtual tables, I'd like to see folders of JSON files as virtual tables. I know there's a whole virtual filesystem kit based around SQLite bu
by wayneftw 6y ago
After CSV files as virtual tables, I'd like to see folders of JSON files as virtual tables. I know there's a whole virtual filesystem kit based around SQLite but what I want is simpler.
- foepys 6y agoI don't think that a folder full of JSON files is actually simpler. There are SQLite drivers for nearly every language out there and querying SQLite is not only very easy and fast but it's also all contained in a single file you can copy around. What do you want to gain by using JSON files specifically? Unless you want a document database but then SQLite is the wrong kind of tool anyways.
- wcarss 6y agoI read it as "I already have or can easily get a folder of JSON files (each representing a table); I want to open them up in SQLite with nearly zero effort." That should be hackable with something like json2csv[1], but I imagine the intent is a desire for something supported, rather than awfully hacked up. 1 - https://github.com/zemirco/json2csv https://github.com/zemirco/json2csv
- foepys 6y agoThat makes way more sense. GGP is probably meaning exactly that, specifically vsv from the OP that I missed initially. https://github.com/nalgeon/sqlite-plus/blob/main/docs/vsv.md https://github.com/nalgeon/sqlite-plus/blob/main/docs/vsv.md
- willvarfar 6y agoNot poster, but also often have large numbers of json-ld files. Json events are really common, and saving events to files is really common, and wanting to query them is also common.
- slt2021 6y agomaybe storing files in mongodb instead of a filesystem can be solution?