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)
Sq.io: jq for databases and more
21–30 of 134 posts
Re: Sq.io: jq for databases and more
#22This 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)
Re: Sq.io: jq for databases and more
#23Re: Sq.io: jq for databases and more
#24This 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)
Re: Sq.io: jq for databases and more
#25This 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)
Re: Sq.io: jq for databases and more
#26This is neat but I'm not really seeing anything I can't do with standard SQL and CLI tools like psql. Seems like you'd learn more reusable things using standard SQL too.
Re: Sq.io: jq for databases and more
#27This 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)
duckdb! https://duckdb.org/docs/extensions/json.html
Re: Sq.io: jq for databases and more
#28This 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)
In 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.
At least not before postgres 17, in the latter json_table does provide this capability.
Re: Sq.io: jq for databases and more
#29I love JQ. But ... I'd never considered its query language to be particularly admirable. If I want to ask questions of some databases, I don't understand why I'd choose JQ's XPATH-like language to do it.
Re: Sq.io: jq for databases and more
#30This is neat but I'm not really seeing anything I can't do with standard SQL and CLI tools like psql. Seems like you'd learn more reusable things using standard SQL too.
I find sq handy when you use it to accomplish things you can't (easily) do with just raw SQL. Things like: exporting certain rows to JSON or CSV, transforming rows into nicely formatted log lines for viewing, or reading in a CSV file and querying it the same way you'd query other databases. It's particularly easy to start using if you're already familiar with the jq. If you use things like `array_to_json(array_agg(ro…