dbt 案例研究简介

案例研究:使用 dbt 构建电商数据模型

Susan Sun

Freelance Data Scientist

为什么选择 dbt?

dbt 覆盖众多行业:

  • 银行与金融服务
  • 电商
  • 教育
  • 政府与公民科技
  • 医疗健康
  • 可再生能源
  • 交通与物流
  • ……等

dbt 与现代技术栈良好集成:

dbt 在示例技术栈中的示意图

1 https://docs.getdbt.com/docs/introduction https://www.getdbt.com/case-studies
案例研究:使用 dbt 构建电商数据模型

构建成果预览

生成的 dbt 模型示意图

案例研究:使用 dbt 构建电商数据模型

构建成果预览

dbt 项目示例:

dbt init 子命令自动生成的一系列文件目录截图。顶层文件夹名为 looker e-commerce。子文件夹包括 analyses、macros、models、seeds、snapshots 和 tests。还有三个杂项文件:gitignore、dbt project yaml 和 readme markdown。

dbt 命令回顾:

# Checks if/where dbt is installed
which dbt 

# Checks the version of dbt installed
dbt --version

# Initializes a new dbt project
dbt init <project_name>

# Short for dbt --help
dbt -h
案例研究:使用 dbt 构建电商数据模型

让我们来练习!

案例研究:使用 dbt 构建电商数据模型

Preparing Video For Download...