Beyond Tables: How Musinsa Built a Self-Optimizing Semantic Layer on Databricks

Junyoung Chang16 Jun 2026

Problem

MUSINSA, a South Korean fashion platform with seven business verticals, had more than 16,000 tables, about 6,500 of them core. Every new question meant a new pipeline and a new mart, so marts kept results but lost the logic behind them. Three analysts asked for January data used three different time columns, formats and boundaries. Batch tables cascade delays, views recompute on every read, and lambda architecture duplicates logic in two codebases.

Example from the article: a catalog search for "order" returned 140 tables that all looked right, so "where is the single source of truth for orders?" had no answer.

Solution in brief

Store business logic, not result tables: expose it as table-valued functions (TVFs) with a standard time interface (a point in time or a time range). Layer the functions, cache their results only for time blocks that were actually requested, and recover lineage from query history. An analyst changes parameters instead of waiting for a new pipeline.

Questions this case answers
  • How to replace per-question result tables with a small set of reusable parameterized functions that hold one time definition and cache only the time blocks that were requested
  • How to find which downstream assets break when a core table or function changes, when lineage is not visible in the catalog
  • How to make every analyst get the same answer to the same time-based question
  • How to replace hundreds of per-question mart tables with a small set of reusable parameterized SQL functions

Tools and methods

  • Table-valued functions (TVFs) in Databricks SQL — encapsulate metric logic behind a time-parameter interface
  • Cached TVF — demand-driven cache of time blocks on Delta Lake
  • Function-level lineage — function schemas plus query history parsed with SQLGlot
  • CDC-lambda serving function — batch table united with a change log in one function
  • Unity Catalog, AI/BI Genie, MCP — governance and AI consumers of the declarative layer
Continue reading — it's free

Google or a one-time email code. No password.