▲ | btbuildem 5 days ago | ||||||||||||||||||||||||||||
Impressive! 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? | |||||||||||||||||||||||||||||
▲ | anon84873628 5 days ago | parent | next [-] | ||||||||||||||||||||||||||||
Sounds good to me! Semantic layers help expose a more user-friendly view of the data, so it is easier to ask business questions and get accurate results. More technically, it brings modularity and reusability to SQL. Things like joins, aggregate functions, and dimensional expressions are encapsulated as new fields/objects. Typically this logic is rendered at query time rather than pre-computed and materialized. The advantage of that is more flexible iteration and composability. In essence they are highly glorified SQL templating engines. | |||||||||||||||||||||||||||||
▲ | refset 5 days ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
Julian Hyde (Apache Calcite, Google) gave a crisp presentation on this and how SQL could express 'measures' to bridge the gap: https://communityovercode.org/wp-content/uploads/2023/10/mon... > A semantic layer, also known as a metrics layer, lies between business users and the database, and lets those users compose queries in the concepts that they understand. It also governs access to the data, manages data transformations, and can tune the database by defining materializations. There's also now a paper: https://arxiv.org/pdf/2406.00251 | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
▲ | articsputnik 5 days ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
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-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. | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
▲ | seedless-sensat 5 days ago | parent | prev [-] | ||||||||||||||||||||||||||||
Came to make the same comment. I got through like 12 paragraphs, and it still hadn't explained what a Semantic Layer is, so I gave up |