LabHub

博客

Semantic Layer·Metrics Store·Reverse ETL 完全指南: dbt·Cube·Looker·Hightouch·Census 与数据激活 (2025)

한국어English日本語中文

Season 5 Ep 5 — 如果说 Ep 4 讲的是管道的工程学,那么 Ep 5 就是“数据的含义只定义一次”这个古老承诺的 2025 年版本。

Prologue — “为什么每个团队算出来的营收都不一样?”

2015 年很多公司都经历过的经典混乱:

同样的数据,不同的数字。原因是:

每个团队各自直接写 SQL,定义因此分岔。Semantic Layer 就是把“指标定义收拢到一处”来解决这个问题的尝试。


第 1 章 · Semantic Layer 的历史

1.1 第一代: BI 内部定义

1.2 第二代: Looker 的 LookML (2013–)

1.3 第三代: Headless / Open Semantic Layer (2020–)

1.4 为什么现在又火起来


第 2 章 · Semantic Layer 的构成

2.1 核心实体

2.2 关系与联接

2.3 过滤器与参数

2.4 示例 (dbt Semantic Layer / MetricFlow)

semantic_models:
  - name: orders
    model: ref('fact_orders')
    entities:
      - name: order_id
        type: primary
      - name: customer_id
        type: foreign
    measures:
      - name: total_amount
        agg: sum
        expr: amount_krw
    dimensions:
      - name: order_date
        type: time
        type_params: {time_granularity: day}

metrics:
  - name: gross_revenue
    type: simple
    type_params:
      measure: total_amount

→ API 调用: metric('gross_revenue', filters=..., group_by=['order_date'])


第 3 章 · dbt Semantic Layer / MetricFlow

3.1 背景

3.2 结构

3.3 优势

3.4 局限


第 4 章 · Cube — “面向开发者的 Semantic Layer”

4.1 定位

4.2 特点

4.3 示例

cube(`Orders`, {
  sql: `SELECT * FROM fact_orders`,
  measures: {
    revenue: { sql: 'amount_krw', type: 'sum' },
    count: { type: 'count' }
  },
  dimensions: {
    orderDate: { sql: 'order_date', type: 'time' },
    country: { sql: 'country', type: 'string' }
  }
});

4.4 用在哪里


第 5 章 · Looker·LookML — “企业级的经典”

5.1 定位

5.2 优势

5.3 局限

5.4 2025 年策略


第 6 章 · 其他主要工具

6.1 AtScale

6.2 Lightdash

6.3 Transform (dbt)

6.4 Metabase·Superset

6.5 Thought Spot


第 7 章 · Metrics Store 模式

7.1 概念

7.2 构成

7.3 例子

7.4 效果


第 8 章 · Headless BI

8.1 定位

8.2 优点

8.3 工具

8.4 局限


第 9 章 · Reverse ETL — “把数据送回运营”

9.1 为什么需要

Reverse ETL: 把数据从 Warehouse 同步到运营 SaaS

9.2 主要工具

9.3 模式

  1. 用 dbt 构建客户分群模型
  2. Reverse ETL 从 Warehouse 读取并推送到 Salesforce/HubSpot/Intercom
  3. 销售与市场立刻用上这些分群

9.4 案例

9.5 数据激活 (Data Activation)


第 10 章 · AI·LLM 与 Semantic Layer

10.1 为什么 AI 需要 Semantic Layer

10.2 “Text-to-SQL” vs “Text-to-Metric”

10.3 案例

10.4 质量管理

10.5 2025 年的方向


第 11 章 · Data Activation 实战场景 3 个

11.1 电商 — 个性化推荐

11.2 B2B SaaS — Product-led Sales

11.3 金融科技 — Risk scoring


第 12 章 · 韩国企业的成熟度

12.1 现状

12.2 引入路径

  1. dbt + 把标准指标写成文档
  2. 在 Metabase/Superset 里把指标暴露出来
  3. 试验 dbt Semantic Layer / Cube
  4. 从特定团队开始用 Reverse ETL 打通运营
  5. 全公司 Metrics Store + 接上 AI

12.3 注意事项


第 13 章 · 反模式 10 例

13.1 没有 Semantic Layer 就直接接 AI

指标幻觉、一致性崩塌。

13.2 只依赖 LookML

和其他 BI・AI 渠道断开。

13.3 指标负责人不明

变更责任出现真空。

13.4 不做 Deprecation 就改

下游的仪表盘会坏掉。

13.5 Reverse ETL 路径泛滥

从 Warehouse 拉出几十条同步管道,无法管理。

13.6 对 Reverse ETL 期待实时

大多是分钟–小时级,并不是“实时”。

13.7 没有 Metric 版本就上线

过去的报表无法复现。

13.8 指标只定义在 Superset/Metabase 里

没有独立的 Semantic Layer → 与其他工具割裂。

13.9 自然语言 BI 缺少完整性校验

原样相信 AI 的回答 → 做出错误决策。

13.10 每个团队各写各的 SQL 算指标

回到原点。


第 14 章 · 检查清单 — Semantic Layer·Reverse ETL 12 项


第 15 章 · 下期预告 — Season 5 Ep 6:“Feature Store 与 Vector·Graph·时序 DB 的融合”

如果说 Semantic Layer 是 BI 的语言层,那么 Feature Store 就是 ML 的语言层。而 2025 年的数据 DB 正在把向量、图、时序融合起来。

数据胜过模型,特征胜过数据”是 2025 年 ML 的智慧。

下一篇再见。


摘要: Semantic Layer 是“指标定义一次,所有渠道复用”这个古老承诺的 2025 年版本。dbt Semantic Layer・Cube・Looker・Lightdash・AtScale 各自占住一个位置,Reverse ETL (Hightouch・Census) 把 Warehouse 的数据送回运营工具,从而完成 Data Activation。在 AI・LLM 时代,Semantic Layer 被提升为 安全的数据访问层,并且推荐用 Text-to-Metric 取代 Text-to-SQL。韩国企业正以 dbt + Metabase/Superset + Hightouch/Census 的组合快速追赶,像 Toss・Coupang・Kakao 那样自建内部 Metrics Store 的案例正在扩散。“讲述数据含义的那一层”不再是奢侈品,而是 AI 时代的基础设施。

评论

还没有评论。

登录后即可发表评论