Live data from Hacker News

Why Semantic Layers Matter (and how to build one with DuckDB)

motherduck.com

1–10 of 47 posts

Re: Why Semantic Layers Matter (and how to build one with DuckDB)

#2
I think Common Logic ( https://en.m.wikipedia.org/wiki/Common_Logic - ISO/IEC 24707:2007) would be a good addition to any effort trying to add a semantic layer to any database.

This is a good write up that doesn’t require DuckDB as it isn’t specific to a particular database.

Re: Why Semantic Layers Matter (and how to build one with DuckDB)

#3
We built a transformation library[0] (think a simpler, more performant dbt) for duckdb and I'd really like to create a semantic layer as an extension for it at some point.

Limiting support to only duckdb would make some really useful features trivial to implement. e.g. duckdb has a `json_serialize_sql` function that would handle a lot of the tedious parts of building a semantic layer.

0 - https://github.com/definite-app/crabwalk

Re: Why Semantic Layers Matter (and how to build one with DuckDB)

#5

We built a transformation library[0] (think a simpler, more performant dbt) for duckdb and I'd really like to create a semantic layer as an extension for it at some point. Limiting support to only duckdb would make some really useful features trivial to implement. e.g. duckdb has a `json_serialize_sql` function that would handle a lot of the tedious parts of building a semantic layer. 0 - https://github.com/definite-…

How do you compare your library to SQLMesh?

Re: Why Semantic Layers Matter (and how to build one with DuckDB)

#6
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 model, "the numbers don't match up", hot mess situations that gain momentum and are hard to slow down.

Re: Why Semantic Layers Matter (and how to build one with DuckDB)

#7
post #6

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…

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.

Re: Why Semantic Layers Matter (and how to build one with DuckDB)

#10

Is a "semantic layer" nothing more than a fancy name for a SQL VIEW in a NoSQL?

No, it's more than that.

Semantic Layer is about decomposing views into dimensions and aggregates, then letting downstream apps/users compose their own views on top without having to redefine/re-calculate business level metrics.

This makes data analyis more flexible than sql views which are hardcoded on particular groupings.

Post reply on HN