3 ms·
Is there anything out there like "SELECT * FROM "http:// http://..."?
by awayto 3y ago
Is there anything out there like "SELECT * FROM "http:// http://..."?
- hnlmorg 3y agoMy shell will do that open http://… | select * where … # FROM can be omitted because you’re loading a pipe https://murex.rocks/optional/select.html https://murex.rocks/optional/select.html
- pizza_pleb 3y agoI think a query language would be great, with a way to subquery/chain data from previous requests (e.g. by jsonpath) to subsequent ones. The closest I’ve gotten is to wrap the APIs with GraphQL. This achieves joining, but requires strict typing and coding the schema+relationships ahead of time which restricts query flexibility for unforeseen edge cases. Another is a workflow automation tool like n8n which isn’t as strict and is more user-friendly, but still isn’t very dynamic either. Postman supports chaining, but in a static way with getting/setting env variables in pre/post request JS scripts. Bash piping is another option, and seems like a more natural fit, but isn’t super reusable for data sources (e.g. with complex client/auth setup) and I’m not sure how well it would support batch requests. It would be an interesting tool/language to build, but I figure there has to be a solution out there already.
- hnlmorg 3y agoThis is exactly what Murex shell does. It has lots of builtin tools for querying structured data (of varying formats) but also supports POSIX pipes for using existing tools like `jq` et al seamlessly too. https://murex.rocks https://murex.rocks
- RyanHamilton 3y agoI'm working on a project I call babeldb. It allows "select * from query_rest('https://api1.binance.com/api/v3/exchangeInfo#.symbols https://api1.binance.com/api/v3/exchangeInfo#.symbols')" The #.symbols at the end is actually jq path expression, it's sometimes needed when the default json to table is suboptimal. You can see it in action by selecting babeldb in the dropdown, then clicking "Run All" here: https://pulseui.net/sqleditor?qry=select%20*%20from%20query_rest(%27https%3A%2F%2Fapi1.binance.com%2Fapi%2Fv3%2FexchangeInfo%23.symbols%27) https://pulseui.net/sqleditor?qry=select%20*%20from%20query_...