4 ms·
This is interesting. I wonder if there is anything that does the opposite - takes JSON input and allows you to query it with SQL syntax (which would be more app
by jasongill 2y ago
This is interesting. I wonder if there is anything that does the opposite - takes JSON input and allows you to query it with SQL syntax (which would be more appealing to an old-timer like me)
- minikomi 2y agoduckdb! https://duckdb.org/docs/extensions/json.html https://duckdb.org/docs/extensions/json.html
- danielhep 2y agoI'm using DuckDB to parse GTFS data, which comes in a CSV format. It works wonderfully.
- kwailo 2y agoclickhouse-local is incredible, and, in addition to JSON, support TSV, CSV, Parquet and many other input formats. See https://clickhouse.com/blog/extracting-converting-querying-local-files-with-sql-clickhouse-local https://clickhouse.com/blog/extracting-converting-querying-l...
- ramraj07 2y agoWhy is this better than DuckDB?
- kitd 2y agoWhy is DuckDB better than clickhouse-local?
- snthpy 2y agoduckdb is shorter to type than clickhouse-local and at the command line brevity is king! Of course the winner here is chdb! (And don't talk to me about shell aliases) :-p While on the topic, how exactly does chdb relate to clickhouse-local?
- nbk_2000 2y agoOctosql does this as well as a few other formats. I've found it useful several times. https://github.com/cube2222/octosql https://github.com/cube2222/octosql
- zie 2y agoIn PostgreSQL, you can just select against JSON and query away to your hearts content. They have JSON data types and functions to work on it.
- masklinn 2y agoThat’s pretty much just jq though, you have bespoke json querying capabilities in sql but you’re not sql-querying your json. At least not before postgres 17, in the latter json_table does provide this capability.
- zie 2y agoThankfully PG17 is released and ready for production querying needs!
- dangitman 2y ago[dead]
- ikari_pl 2y agoPostgres:) load It into a jsonb column and the possibilities are endless, including indexing
- fmajid 2y agohttps://github.com/postgrespro/jsquery https://github.com/postgrespro/jsquery
- eproxus 2y agoThis tool can do that: $ cat example.json | sq sql 'SELECT * FROM data' actor_id first_name last_name last_update 1 PENELOPE GUINESS 2020-06-11T02:50:54Z 2 NICK WAHLBERG 2020-06-11T02:50:54Z One of the data source types is 'json' and the command 'sq sql ...' lets you execute SQL directly instead of using their default query language (SLQ).
- jasongill 2y agowow, I missed that in the docs but this is exactly what I was thinking!
- beembeem 2y agolet me introduce you to this hot, open source, nosql database that's webscale...
- snthpy 2y agoThis question has come up a few times in this thread. However I don't see how people expect this to be possible unless they are talking about ndjson with flat records. JSON in general is a very nested format so languages based on relational algebra/calculus like SQL and PRQL are not going to be that useful unless the data is flattened and normalised first.