@krzyzanowskim only this post is useless piece of garbage, they both compliment and disagree with each other very well not this bad . what you are selling here ?
Is Gemini Neon >>>> Opus 5.5 ? or just another hype from influencers - @theo admits that its good model from Gemini likewise who else can confirm the real data not hype shit
I've used AdventureWorks for almost ten years. SQL practice, warehouse projects, demos. I could write the joins in my sleep.
But I never knew what the business behind it actually does.
Why does the fiscal year start in July? What separates an internet order from a reseller order? What do product line codes R, M, T, and S mean?
So I built an ontology for it, to finally understand the data and to show what an ontology is for, on a database almost every data person has touched.
One catch: LLMs have memorized AdventureWorks. So I scrambled it into 33 Postgres views with enterprise-style names. SalesOrderHeader became wh.sls_ord_hdr.
Then came the part nobody talks about: finding the business definitions.
The tables tell you what's stored. They never tell you what it means. So I went looking where real companies keep that knowledge:
📄 Microsoft's own documentation for the AdventureWorks sample, which describes the company, its sales channels, and its product lines 🗂️ The XML hidden inside the database itself. Store surveys with annual sales and specialty, plus product descriptions nobody ever queries 📝 Short business docs I wrote from those sources: a company overview, KPI definitions, and product codes, each linked to its source
Every rule in the ontology points back to the doc it came from. "Fiscal year starts July 1" traces to the company overview. "Internet order means onl_flg = TRUE" traces to the KPI definitions. No source, no rule.
30 questions, with and without the ontology:
Gemini 2.5 Flash: 53% → 87%
gpt-oss 120B: 33% → 73%
Nemotron 3 Super: 47% → 70%
Every model with the ontology beat every model without it.
What it taught me about ontologies:
→ The model stops guessing. "Internet orders" becomes onl_flg = TRUE because a rule says so.
→ Every term gets one meaning. "Revenue" means one formula, whoever asks.
→ Business knowledge becomes SQL. "FY2024" turns into a July-to-June date filter.
→ Your users' words map to columns. "Online," "web," and "internet" land on the same flag.
→ It matters more than the model. The weakest model gained 40 points.
How to build one for any data source, with basic Python, YAML, and SQL:
Load the data into Postgres.
Profile it: column types, sample values, likely join keys.
Collect the docs that hold the rules your columns don't state: wikis, KPI sheets, onboarding decks, even the XML or JSON blobs sitting in your own tables.
Write one YAML file: entities, joins, rules, metrics, value meanings, synonyms. Tag every rule with its source doc. Let an LLM draft it, then fix it by hand.
For each question, pull only the relevant slice into the prompt.
Run the SQL read-only, with a timeout. Write 30 questions with hand-checked answers. Compare with and without the ontology.
Do this before you touch enterprise tooling. Once the joins and rules outgrow a file, move relationships to Neo4j or Apache AGE, metrics to dbt MetricFlow or Cube, ownership and lineage to DataHub or OpenMetadata, and gate every ontology change behind your eval in CI.
Everything is open source: Postgres setup, scrambled views, business docs with sources, Streamlit UI, and eval harness.
Article and repo in the first comment.
What dataset did you learn SQL on, and do you know the business behind it?
#DataEngineering #TextToSQL #Ontology #SQL #OpenSource
Your warehouse has 240 tables named things like f_pto_agg and d_wfm_fclty_pop_dfntn_mnl.
No table or column comments. No dbt docs, no ERD, no data model anyone kept up to date. Unity Catalog or Snowflake is there, but nobody filled in the descriptions, so there’s nothing for a tool to build a semantic model from.
The one engineer who knows how these tables join just gave notice. And your VP wants a text-to-SQL agent.
So you’re stuck choosing. Write the semantic layer by hand, table by table, for six months. Or push raw table names into a vector DB and watch retrieval miss. Someone asks about “approved time-off requests,” and the right table is f_pto_agg. Those share zero words, so embeddings have nothing to match on.
A new paper from Amazon and USC takes a different route: skip the docs and mine your query logs.
Every JOIN your analysts ever wrote is sitting in your query history. Those logs already record which tables go together, on which keys, and how often.
I rebuilt the first stage in Python with sqlglot and DuckDB on TPC-DS (24 tables, zero declared keys). From 99 queries, the parser pulled 79 join edges. The top one showed up 64 times, and the catalog had no record of it.
What I took away from the paper:
→ The graph replaces the YAML. Tables become nodes, joins become edges weighted by how often people use them. On Amazon’s warehouse that meant 1,847 edges from about 500K queries.
→ An LLM writes the missing docs. Feed Claude 3.7 Sonnet sample queries for each table and it returns descriptions, filters, and business terms like “employee” and “time-off” as JSON.
→ Entities first, embeddings last. Exact term matches get 0.5 weight, substring matches 0.3, embeddings 0.2, then Personalized PageRank finds the bridge tables. On the BEAVER benchmark, 95.7% of its SQL ran without errors, against 60.8% for plain embedding retrieval. Amazon’s data engineers preferred it 70% to 10%.
→ Read the numbers twice. “Runs without errors” isn’t “correct.” On questions with one right answer, human-written SQL still won 64.9% to 26.3%. The BEAVER test had no query logs at all. And logs carry your team’s old mistakes, deprecated joins included.
The video shows the moment it clicks. The full article has the sqlglot code, a stack guide by warehouse size (NetworkX for small, Neo4j when teams share the graph), and my critique.
How is your team handling undocumented tables for LLM agents: semantic layer, or query logs?
#DataEngineering #TextToSQL #GraphRAG #LLM #DuckDb
@yajnshri it should be no human is bad, its that behaviour of other human changes the attitude. Men and women are not same agree, but they both should learn human condition on what other person is nothing but you in different form.
Databricks and Snowflake ship 16 of 19 semantic capabilities natively. 17 of 24 data platforms ship fewer than 10.
I mapped 65 products: semantic layers, catalogs, NLQ, MCP, ontology. Every cell sourced.
Filter, compare, check your stack:
https://t.co/c7VjbSi0yT
@Tim_Denning but in either case both needs money , everyone needs such people to help them right ? not all can be founders, then who will be the workers/helpers to get that task done
@Tim_Denning whenever i see such post, i feel why nobody told me this when i was young , when i was trying hard to get society approval with status like white collar job, marriage, big house and car , family - damnn