SuperAPI AI 工具集

dbt-transformation-patterns

数据与分析

查看项目

更新于 10-16 00:30

技能介绍

用途:该技能用于掌握 dbt(data build tool)的分析工程实践,覆盖模型组织、测试策略、文档编写与增量处理,适合构建数据转换管道、按 staging/intermediate/marts 分层组织模型、实施数据质量测试、为大数据集创建增量模型、记录数据模型与血缘关系以及搭建 dbt 项目结构。

主要能力:采用 Medallion 分层架构(sources→staging→intermediate→marts);命名规范为 staging 用 stg_ 前缀、intermediate 用 int_ 前缀、marts 用 dim_ 与 fct_ 前缀;提供源定义、staging 模型、中间模型、维度与事实模型、测试与文档、宏与 DRY 代码、增量策略等模式;支持 unique、not_null、relationships、accepted_values 等测试,以及 dbt_utils 的表达式与新鲜度测试。

使用方式:在 dbt_project.yml 中配置 model-paths、test-paths、macro-paths 与各层物化方式(staging 为 view、intermediate 为 ephemeral、marts 为 table)。常用命令包括 dbt run、dbt run --select staging、dbt run --select +fct_orders、dbt run --full-refresh、dbt test、dbt build、dbt docs generate、dbt docs serve、dbt compile、dbt debug、dbt ls --select tag:critical。增量策略可选 delete+insert、merge、insert_overwrite。

适用场景与限制:适用于使用 dbt 构建分析工程管道的团队。资料未提供具体收费、价格、平台支持范围或效果数据,暂未提供相关信息。