Live data from Hacker News

Sq.io: jq for databases and more

sq.io

51–60 of 134 posts

Re: Sq.io: jq for databases and more

#51
post #48

Sometimes I wonder if it wouldn't be more efficient for people to just learn SQL instead of trying to build tools or layers on top of it that introduce more complexities and are harder to search for.

SQL interop is where the pain is at. Using standard tooling of most database systems, best you can get is CSV with all the pains this shithole of a data transfer format brings.

Re: Sq.io: jq for databases and more

#52

I 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.

honestly I'd rather have sql for json than jq for a database... guess this is exactly what clickhouse-local does

Re: Sq.io: jq for databases and more

#53
Though I respect and applaud the effort that went into creating this and successfully releasing it, It has fewer features than duckdb supports at the moment.

Duckdb supports both Postgres, Mysql, SQLite and many other extensions.

Postgres: https://duckdb.org/docs/extensions/postgres

MySQL: https://duckdb.org/docs/extensions/mysql

SQLite: https://duckdb.org/docs/extensions/sqlite

You can try this yourself.

1. Clone this repo and create a postgres container with sample data: https://github.com/TemaDobryyR/simple-postgres-container

2. Install duckdb if you haven't and if you have just access it on the console: https://duckdb.org/docs/installation/index?version=stable&en...

3. Load the postgres extension: INSTALL postgres;LOAD postgres;

4. Connect to the postgres database: ATTACH 'dbname=postgres user=postgres host=127.0.0.1 password=postgres' AS db (TYPE POSTGRES, READ_ONLY);

5. SHOW ALL TABLES;

6. select * from db.public.transactions limit 10;

Trying to access SQL data without using SQL only gets you so far and you can just use basic sql interface for that.

Re: Sq.io: jq for databases and more

#54
post #48

Sometimes I wonder if it wouldn't be more efficient for people to just learn SQL instead of trying to build tools or layers on top of it that introduce more complexities and are harder to search for.

I think it'd be a moot point if SQL wasn't painful and awkward to work with in the first place. But database purists control it and won't let go, so we will have to live with everyone else inventing layers to make their lives easier.

Re: Sq.io: jq for databases and more

#55
post #39
post #37

Earlier quoted context omitted.

What I love about `jq` that I can edit my query (or "program") by appending tokens at the end. Similar to unix pipes. With plain SQL that is not easy.

Sounds like PRQL [1]. [1] https://prql-lang.org/

Kind of. However on first glance it seems like the separator in PRQL is a newline instead of a `|`, which is less ergonomic in a shell.

Re: Sq.io: jq for databases and more

#56
post #54
post #48

Sometimes I wonder if it wouldn't be more efficient for people to just learn SQL instead of trying to build tools or layers on top of it that introduce more complexities and are harder to search for.

I think it'd be a moot point if SQL wasn't painful and awkward to work with in the first place. But database purists control it and won't let go, so we will have to live with everyone else inventing layers to make their lives easier.

For me this feels like the complaints about error handling in Go. People who work with it all the time, don't even think about it past the first week. If you are starting out it might bother people because they are not used to it.

Personally I really like working with SQL and find it quite elegant, I always encourage people to use it as it really is a job-superpower if you can just dig up issues directly in the DB quickly. It has a long history so for every question you have there's many answers or avenues to ask them.

Re: Sq.io: jq for databases and more

#58
post #49
post #48

Sometimes I wonder if it wouldn't be more efficient for people to just learn SQL instead of trying to build tools or layers on top of it that introduce more complexities and are harder to search for.

HN is inundated with posts announcing paper thin abstractions on top of existing technology or utilities that just move the goalpost of what you knowledge you need to be effective. It's a weird trend that seems almost entirely motivated by people wanting open source projects in their resume, or seek funding if its a startup.

> It's a weird trend that seems almost entirely motivated by people wanting open source projects in their resume

That’s really harsh and misguided. If people didn’t do “paper thin abstractions” projects on their own time for the simple pleasure of doing it we wouldn’t have 90% of the successful projects we have today.

Let people have fun and don’t judge their motives when they’re making something Open Source. I can guarantee the person just thought “this would be cool to have” and implemented it.

Re: Sq.io: jq for databases and more

#59
It still seems to me a better solution to these sorts of problems is to use a better shell like nushell, that has richer datatypes, and so you can use the same tool to manipulate files, processes, json, csv, databases and more.

Re: Sq.io: jq for databases and more

#60
post #48

Sometimes I wonder if it wouldn't be more efficient for people to just learn SQL instead of trying to build tools or layers on top of it that introduce more complexities and are harder to search for.

It's funny because recently a "full stack" dev who's in reality 95% frontend was telling me he's not a fan of Tailwind and that he'd rather learn "proper" CSS.

And the irony is of course, he never wants to use a relational DB to avoid SQL, so No-SQL DB it is.

Post reply on HN