Trilogy – A Reusable, Composable SQL Experiment
Recipe: Add a semantic layer to SQL; use it drop the requirement for joins/group_by; add in type-checking and a lightweight python-esque import syntax to enable reuse and hierarchical querying. Trilogy is intended to provide an accessible but deep alternative to raw SQL. It offers a new-but-inspired-by-SQL syntax that compiles to various dialects of SQL (with DuckDB as the default). The target audience is people that really like SQL for analytics and data engineering, but want less boilerplate and sharp edges and looser coupling to the DB. Semantic models can be easily shared, composed…
In plain words
Trilogy is a SQL alternative that adds a semantic layer to reduce boilerplate like joins and group-by clauses. It uses a Python-inspired syntax with type-checking and a reusable import system, compiling to various SQL dialects including DuckDB. Designed for analysts and data engineers who prefer SQL but want cleaner code and looser database coupling, Trilogy enables interactive semantic model composition and sharing while maintaining SQL's ad-hoc workflow capabilities. It includes experimental ETL and DBT integration support.
written from the facts on this page · September 2026
From the sources
In the maker’s words, at launch
Recipe: Add a semantic layer to SQL; use it drop the requirement for joins/group_by; add in type-checking and a lightweight python-esque import syntax to enable reuse and hierarchical querying. Trilogy is intended to provide an accessible but deep alternative to raw SQL. It offers a new-but-inspired-by-SQL syntax that compiles to various dialects of SQL (with DuckDB as the default). The target audience is people that really like SQL for analytics and data engineering, but want less boilerplate and sharp edges and looser coupling to the DB. Semantic models can be easily shared, composed and iterated on in an interactive session, preserving the adhoc workflows that make SQL so powerful. The "higher level" of the language vis-a-vis SQL makes it straightforward to extend into ETL (an experimental basic DBT integration is available), offering potential to optimize a processing graph across intermediate staging nodes automatically. This higher level of abstraction also offers some nice opportunities for more reliable text to SQL for LLMs. A similarly basic integration is available to demonstrate this, as is a very basic VsCode extension and electron-based IDE. Tech stack is primarily Python. Open source, MIT license. Github is linked from demo page. Thoughts, feedback, contributions all welcome! Note: renamed from PreQL (see prior show https://news.ycombinator.com/item?id=40728938) to avoid confusion with the many PreQLs of the world. The `SQL pun` naming space is unfortunately well-explored. Other SQL replacements (all great, all worth a look!): PRQL (pipelined SQL alternative, all new syntax) https://news.ycombinator.com/item?id=36866861 Malloy (all new syntax, semantic focus) https://news.ycombinator.com/item?id=30053860 preql (much more ambitious, all new syntax) https://news.ycombinator.com/item?id=26447070
More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 1d ago · opentrailpaper.com

Launched alongside, November 2024
the whole month →


- IB
I wasn't quite sure if this qualified as "Show HN" given you can't really download it and try it out. However, dang said[0]: > If it's hardware or something that's not so easy to try out over the internet, find a different way to show how it actually works—a video, for example, or a detailed post with photos. Hopefully I did that? Additionally, I've put code and a detailed guide for the netboot computer management setup on GitHub: https://github.com/kentonv/lanparty Anyway, if this shouldn't have been Show HN, I apologize! [0]…
Dev tools · 2024 · lanparty.house

