I love a semantic layer as much as the next guy... Pivoting a decent sized BI shop toward using one instead of splashing the same SQL all over the place is *tough*. It's one of those: "the analyst could have been building important report for director and you want them to create re-usable logic??? we'll do that later, get report done now. Just copy/paste that SQL over here" This is how you end up with the the 1000 mo…
Why Semantic Layers Matter (and how to build one with DuckDB)
21–30 of 47 posts
Re: Why Semantic Layers Matter (and how to build one with DuckDB)
#22Feature stores explored here: https://www.xorq.dev/blog/featurestore-to-featurehouse
I think my key takeaway building this is that we need better expression systems and Ibis is a great foundation to build yours..maybe you want to build a language for some other domain etc.
PS: I am one of the authors of bsl and co-founder of Xorq.
I am one of the authors of bsl and founder of xorq.
Re: Why Semantic Layers Matter (and how to build one with DuckDB)
#23Earlier quoted context omitted.
The flip side is, you often don’t know what needs to be reusable until you’ve had some iterations. Wrong abstractions can be way worse, and also gain their own momentum.
The problem is that often these quick or maybe not reusable are written in such a haste that there's no breadcrumbs left to do the right thing whenever you are done getting that urgent thing out (most likely never because "everything is urgent" :( )
Re: Why Semantic Layers Matter (and how to build one with DuckDB)
#24Impressive! An entire article about semantic layers, artfully avoids ever defining what a semantic layer is. Let me take a swipe at it: a semantic layer helps express queries and their results in terms the end-consumers will care about / prefer to reason in, instead of whatever extremely correct and efficient atrocities the database nerds came up with. Did I get that right?
Re: Why Semantic Layers Matter (and how to build one with DuckDB)
#25I like the idea of a semantic Layer but don't think defining it in yaml is the right way to go about it. Semantic Layer needs proper language and tooling support which Malloy provides.
Re: Why Semantic Layers Matter (and how to build one with DuckDB)
#26Impressive! An entire article about semantic layers, artfully avoids ever defining what a semantic layer is. Let me take a swipe at it: a semantic layer helps express queries and their results in terms the end-consumers will care about / prefer to reason in, instead of whatever extremely correct and efficient atrocities the database nerds came up with. Did I get that right?
> There's a lot of information out there, including from myself about the history and rise [2022], comparing it to an MVC-like approach, or explaining its capabilities. That's why in this article I focus on the why and showcase how to use it in a practical example in the next chapter.
[1] https://www.ssp.sh/blog/rise-of-semantic-layer-metrics/ [2] https://cube.dev/blog/exploring-the-semantic-layer-through-t... [3] https://cube.dev/blog/universal-semantic-layer-capabilities-...
My one line definition that I use atm:
> A semantic layer acts as an intermediary, translating complex data into understandable user business concepts. It bridges the gap between raw data in databases (such as sales data with various attributes) and actionable insights (such as revenue per store or popular brands). This layer helps business users access and interpret data using familiar terms without needing deep technical knowledge. https://www.ssp.sh/brain/semantic-layer#semantic-layer-defin...
Edit: I'm the OP.
Re: Why Semantic Layers Matter (and how to build one with DuckDB)
#27Is a "semantic layer" nothing more than a fancy name for a SQL VIEW in a NoSQL?
Kind of annoying the article writes "What is [a semantic layer] anyway?" twice but never defines it directly.
Re: Why Semantic Layers Matter (and how to build one with DuckDB)
#28I like the idea of a semantic Layer but don't think defining it in yaml is the right way to go about it. Semantic Layer needs proper language and tooling support which Malloy provides.
I curate some more on here in case of interest: https://www.ssp.sh/brain/data-modeling-languages.
Re: Why Semantic Layers Matter (and how to build one with DuckDB)
#29Is a "semantic layer" nothing more than a fancy name for a SQL VIEW in a NoSQL?
It's a lot more. A SQL VIEW is just a saved query, where a semantic layer defines the shared meaning of the data, and helps enforce consistent metrics, joins, and logic across tools. You'd be surprised at how many ways "active customer" can be represented as SQL.
create view active_cx as select * from customer join audit_events using(...) join ... where -- active condition
-- use active_cx wherever
select ... from orders join active_cx using(...) where ts > start_of_month() group by active_cx.idRe: Why Semantic Layers Matter (and how to build one with DuckDB)
#30Impressive! An entire article about semantic layers, artfully avoids ever defining what a semantic layer is. Let me take a swipe at it: a semantic layer helps express queries and their results in terms the end-consumers will care about / prefer to reason in, instead of whatever extremely correct and efficient atrocities the database nerds came up with. Did I get that right?
From the article: > There's a lot of information out there, including from myself about the history and rise [2022], comparing it to an MVC-like approach, or explaining its capabilities. That's why in this article I focus on the why and showcase how to use it in a practical example in the next chapter. [1] https://www.ssp.sh/blog/rise-of-semantic-layer-metrics/ [2] https://cube.dev/blog/exploring-the-semantic-layer-t…