在 dbt 中,`generic tests` (通常在 schema.yml …

中等SQLdbt

问题

在 dbt 中,generic tests (通常在 schema.yml 定义) 与 singular tests (在 tests 目录下写的 SQL) 有何本质区别?

答题要点

  1. Generic Tests (通用测试): 是可复用的模板。如 unique, not_null。
  2. Singular Tests (专项测试): 是针对特定业务逻辑编写的任何 SQL 查询。如果 SQL 返回记录,则判定测试失败。

完整解析在题库里看

核心知识点、易错点和面试官想听到什么;练过的题会进入记录,答错的进错题本。

去练这道题

回知识库看这一块

同一能力的其他题