Tr

Trilogy – A Reusable, Composable SQL Experiment

Hacker News

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

Share card

Actual performance

78points
40comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Hacker NewsStrong engagement from HN community · Strong signals: open source, ide, pipe · Missing: https docs, excited, just released
84%84% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
76%76% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Product HuntOn track for Day 1 leaderboard · Strong signals: model, new, models · Missing: mac, agents, macos
75%75% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
34%34% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
32%32% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: active · Missing: arr, mrr, revenue
10%10% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

I
I Solved N Queens in SQL56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I Solved N Queens in SQL

Hacker News2
Li
Lithium::SQL C++17, Header Only MySQL and SQLite Connectors and ORM76%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Lithium::SQL C++17, Header Only MySQL and SQLite Connectors and ORM

Hacker News2
Go
Go Fearless SQL67%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Go Fearless SQL

Hacker News3
Mo
Mongita is to MongoDB as SQLite is to SQL77%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Mongita is to MongoDB as SQLite is to SQL

Hacker News126
SQ
SQL Basics59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

SQL Basics

Hacker News26
Qu
Querying OpenAPI Definitions with SQL59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Querying OpenAPI Definitions with SQL

Hacker News1
YA
YAML to SQL57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

YAML to SQL

Hacker News1
Ba
Baldrick. Your SQL Dogsbody64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Baldrick. Your SQL Dogsbody

Hacker News2
SQ
SQL Polyglot63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

SQL Polyglot

Hacker News53
ca
can we get rid of SQL?67%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

can we get rid of SQL?

Hacker News2