←back to thread

171 points voat | 1 comments | | HN request time: 0.207s | source
Show context
usgroup ◴[] No.42162753[source]
Its nice to see Logica has come on a bit. A year or two ago I tried to use this in production and it was very buggy.

The basic selling point is a compositional query language, so that over-time one may have a library of re-usable components. If anyone really has built such a library I'd love to know more about how it worked out in practice. It isn't obvious to me how those decorators are supposed to compose and abstract on first look.

Its also not immediately obvious to me how complicated your library of SQL has to be for this approach to make sense. Say I had a collection of 100 moderately complex and correlated SQL queries, and I was to refactor them into Logica, in what circumstances would it yield a substantial benefit versus (1) doing nothing, (2) creating views or stored procedures, (3) using DBT / M4 or some other preprocessor for generic abstraction.

replies(1): >>42162912 #
thenaturalist ◴[] No.42162912[source]
Never heard of M4 before and, lo and behold, of course HN has a discussion of it: https://news.ycombinator.com/item?id=34159699

The author discusses Logica vs. plain SQL vs POSIX.

I’d always start with dbt/ Sqlmesh.

The library you’re talking about exists: dbt packages.

Check out hub.getdbt.com and you’ll find dozens of public packages for standardizing sources, data formatting or all kinds of data ops.

You can use almost any query engine/ DB out there.

Then go for dbt power user in VS Code or use Paradime and you have first class IDE support.

I have no affiliation with any of the products, but from a practitioner perspective the gap between these technologies (and their ecosystems) is so large that the ranking of value for programming is as clear as they come.

replies(1): >>42163309 #
thom ◴[] No.42163309[source]
M4 is absolutely ancient, one of those things you've probably only seen flashing by on your screen if you've found yourself running `make; make install`. I suppose it is a perfectly cromulent tool for SQL templating but you're right that you must be able to get more mileage out of something targeted like dbt/SQLMesh.
replies(2): >>42165367 #>>42165374 #
1. pstoll ◴[] No.42165367[source]
Having debugged my share of autoconf setups..I assumed it had to be a new M4 and not the ancient quirky GNU M4 thing because no one in their right mind would wish M4 (and related GNU autoconfig / autconf) on any other sentient beings.

It’d be like saying - “hey, I’m starting a new project and trying to pick between ed, sed, or awk. Whatcha think”? Def not.