# Apache Griffin

**Apache Griffin** 是一个面向大数据的数据质量开源平台，在 Apache 软件基金会内部开发，可在批处理和流处理两种模式下度量数据质量，并提供统一的流程来定义度量指标、执行度量并发布度量结果。项目于 2016 年 12 月 5 日进入 Apache 孵化器，2018 年 11 月 21 日毕业成为顶级项目，2025 年退役并移入 Apache Attic，迁移工作于 2025 年 11 月完成。<sup>[1](https://incubator.apache.org/projects/griffin.html)</sup><sup> • </sup><sup>[2](https://attic.apache.org/projects/griffin.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 状态 | 已退役；2018 年 11 月成为顶级项目，2025 年 9 月退役，2025 年 11 月在工单 ATTIC-246 下完成移入 Attic<sup>[2](https://attic.apache.org/projects/griffin.html)</sup><sup> • </sup><sup>[3](https://attic.apache.org/tracking.html)</sup> |
| 起源 | 2016 年 12 月 5 日进入 Apache 孵化器；2018 年 11 月 21 日毕业<sup>[1](https://incubator.apache.org/projects/griffin.html)</sup> |
| 用途 | 面向大数据的数据质量服务平台（DQSP），覆盖批处理与流处理模式，构建于 Apache Hadoop 和 Apache Spark 之上<sup>[4](https://github.com/apache/griffin/blob/master/griffin-doc/intro.md)</sup> |
| 度量的维度 | 准确性、完整性、重复性（唯一性）、模式符合性、剖析，以及自定义 SparkSQL 检查<sup>[5](https://apache.googlesource.com/griffin/%2B/HEAD/griffin-doc/measure/dimensions.md?autodive=0%2F%2F)</sup> |
| 数据源 | 批处理：HDFS 上的 Hive 表和 avro 文件；流处理：Apache Kafka<sup>[6](https://apache.googlesource.com/griffin/%2Bshow/refs/heads/griffin-0.6.0-rc0/griffin-doc/roadmap.md)</sup> |
| 最终版本 | 0.6.0（发布历史从 2017 年 7 月的 0.1.5-incubating 到 2020 年 11 月的 0.6.0）<sup>[7](https://release-catalog.apache.org/griffin/archive.html)</sup> |
| 代码 | GitHub 镜像于 2025 年 11 月 24 日归档；约 1.2k 星标、584 个复刻、651 次提交<sup>[8](https://github.com/apache/griffin)</sup> |

## 历史

Griffin 于 2016 年 12 月被接纳进入 Apache 孵化器，到 2017 年 1 月 23 日，邮件列表、wiki、JIRA、git 仓库和网站均已初始化。随后陆续发布孵化版本：2017 年 8 月的 0.1.5-incubating、2017 年 11 月的 0.1.6-incubating、2018 年 5 月的 0.2.0-incubating 和 2018 年 9 月的 0.3.0-incubating。项目于 2018 年 11 月 21 日毕业成为顶级项目。<sup>[1](https://incubator.apache.org/projects/griffin.html)</sup>

项目自身的文档描述了它在 eBay 的起源：当时跨流处理和批处理平台验证数据质量的团队遇到三个问题——没有跨数据源的端到端数据质量统一视图，没有面向流数据质量度量的统一自助系统，也没有暴露 API 服务的共享平台，于是每个团队都自行重建工具。在 eBay 的实时个性化平台上，每天大约有 6 亿条记录需要验证。<sup>[4](https://github.com/apache/griffin/blob/master/griffin-doc/intro.md)</sup>

毕业之后，项目继续发布版本：其分发包归档显示，0.4.0 和 0.5.0 于 2020 年 7 月归档，0.6.0 于 2020 年 11 月归档。<sup>[7](https://release-catalog.apache.org/griffin/archive.html)</sup> 此后开发活动逐渐减少。一段覆盖 2023 年 8 月至 2025 年 10 月的 GitHub 活动窗口记录到 20 次推送和 85 个拉取请求，贡献集中在少数几个人和自动依赖更新机器人身上。<sup>[9](https://ghe.derekchia.com/repo/apache/griffin)</sup>

## 架构与工作流程

Griffin 是一个模型驱动的解决方案，围绕三个步骤组织。第一步，数据科学家和分析师定义数据质量需求，如准确性、完整性、及时性或剖析。第二步，将源数据摄入 Griffin 计算集群，并针对这些需求运行度量。第三步，将数据质量报告作为度量结果发布到指定目的地。<sup>[10](http://griffin.incubator.apache.org/)</sup>

平台分为三层。数据采集层支持批处理数据——通过多种连接器从 Hadoop 采集——以及实时数据——通过 Kafka 等消息系统接入以进行近实时分析。处理与存储层在 Spark 集群中为两种模式计算数据质量指标，结果存入 [Elasticsearch](https://www.edgepedia.org/zh/elasticsearch) 以服务前端请求。服务层暴露 RESTful Web 服务，用于探索数据集、创建度量、发布和获取度量结果以及管理订阅，使开发者可以在其上构建自己的用户界面。<sup>[4](https://github.com/apache/griffin/blob/master/griffin-doc/intro.md)</sup> 在已部署的发行版中，服务模块通过 Livy 在 Spark 上触发计算作业，并默认将指标值持久化到 Elasticsearch。<sup>[6](https://apache.googlesource.com/griffin/%2Bshow/refs/heads/griffin-0.6.0-rc0/griffin-doc/roadmap.md)</sup>

在规则定义方面，Griffin 提供了 Griffin DSL，这是一种为数据质量度量定制的类 SQL 语言，涵盖准确性、剖析、唯一性和及时性等度量类型，以及批处理模式下的 Hive、avro 和流处理模式下的 Kafka 等数据源类型。对于准确性，用户需提供类似 SQL where 子句的比较规则，例如将 `source.uid`、`source.itemid` 和 `source.timestamp` 与目标进行匹配。<sup>[11](https://cwiki.apache.org/confluence/spaces/GRIFFIN/pages/69405833/7.%2BApache%2BGriffin%2BDSL%2BGuidance)</sup>

## 数据质量维度

Griffin 的文档围绕具名维度组织数据质量度量，每个维度都有自己的度量类型：<sup>[5](https://apache.googlesource.com/griffin/%2B/HEAD/griffin-doc/measure/dimensions.md?autodive=0%2F%2F)</sup>

- **准确性**：数据值与已确定的参考真值数据源的一致程度。Griffin 的准确性指标基于 DAMA UK 的定义，即“数据正确描述其所描述的‘真实世界’对象或事件的程度”，这需要用户提供参考数据集。<sup>[12](https://pmc.ncbi.nlm.nih.gov/articles/PMC9009315/)</sup>
- **完整性**：数据集合中数据值存在的程度。由于不同用户对完整性的定义不同，Griffin 允许用户编写类 SQL 表达式，例如 `name is NULL` 或检查电子邮件格式的 RLIKE 模式。<sup>[5](https://apache.googlesource.com/griffin/%2B/HEAD/griffin-doc/measure/dimensions.md?autodive=0%2F%2F)</sup>
- **重复性**：用户定义数据资产的冗余指标，按重复值、不同值、非唯一值和唯一值计数计算。<sup>[5](https://apache.googlesource.com/griffin/%2B/HEAD/griffin-doc/measure/dimensions.md?autodive=0%2F%2F)</sup>
- **模式符合性**：属性是否遵循标准数据类型定义，对于 csv、json 和 xml 等不保留模式信息的文本格式尤为重要。<sup>[5](https://apache.googlesource.com/griffin/%2B/HEAD/griffin-doc/measure/dimensions.md?autodive=0%2F%2F)</sup>
- **剖析**：审查源数据的结构和内容，例如位数不正确的电话号码所占的百分比。<sup>[5](https://apache.googlesource.com/griffin/%2B/HEAD/griffin-doc/measure/dimensions.md?autodive=0%2F%2F)</sup>
- **SparkSQL**：一种专业模式，用于其他度量未覆盖的复杂自定义检查，以包含 `select`、`from`、`where` 和 `group-by` 等子句的 SparkSQL 查询表达。<sup>[5](https://apache.googlesource.com/griffin/%2B/HEAD/griffin-doc/measure/dimensions.md?autodive=0%2F%2F)</sup>

一份项目路线图列出了可通过用户界面管理的度量（准确性、剖析、发布度量）和可通过服务 API 管理的度量（准确性、剖析、及时性、唯一性、完整性和发布度量），并计划增加一致性和有效性维度，以及基于已存入 Elasticsearch 的指标进行异常检测。<sup>[6](https://apache.googlesource.com/griffin/%2Bshow/refs/heads/griffin-0.6.0-rc0/griffin-doc/roadmap.md)</sup>

## 评估与比较

2022 年，林茨约翰内斯·开普勒大学面向应用的知识处理研究所的 Lisa Ehrlinger 与该研究所的 Wolfram Wöß 对 667 款数据质量工具进行了一项系统性调查，选出包括 Griffin 在内的 13 款工具进行详细评估，指出它致力于在批处理和流处理两种模式下持续度量大数据质量。<sup>[12](https://pmc.ncbi.nlm.nih.gov/articles/PMC9009315/)</sup> 他们的发现具体说明了采用成本：在 Ubuntu 18.04 上安装 0.2.0-incubating 版本需要 JDK 1.8+、MySQL、npm、Hadoop 2.6.0+、Spark 2.2.1+、Hive 2.2.0、Livy 和 Elasticsearch，两名经验丰富的计算机科学家需要一周多时间才能完成完整安装。安装完成后，他们发现用户界面在定义和调度准确性指标方面直观易用，但指出该版本的工具不提供数据剖析功能，也不是一个全面的数据质量解决方案。在能力比较中，Griffin 是受调查工具中唯一提供表级准确性指标的，该指标由源表和目标表计算得出，即匹配记录数除以源记录总数。<sup>[13](https://www.frontiersin.org/journals/big-data/articles/10.3389/fdata.2022.850611/full)</sup>

后来的第三方评测得出了相似的图景。咨询公司 Smile 在 2025 年的一项基准测试中将 Griffin 描述为适合与 Spark 和 Hadoop 集成的大数据场景，但用户友好性较差，给出加权总分 118，而 Talend Data Quality 为 204，Dataiku 为 214，并将它与 [Great Expectations](https://www.edgepedia.org/zh/great-expectations) 一同列为经济、灵活的开源选项，适合愿意定制的有经验的团队。<sup>[14](https://smile.eu/en/publications-and-events/choosing-right-data-quality-solution-2025)</sup> DQOps 的一篇评测认为 Griffin 具有一项独特能力：在为 [Apache Spark](https://www.edgepedia.org/zh/apache-spark) 和 Hive 提供批处理的同时，还能为 [Apache Kafka](https://www.edgepedia.org/zh/apache-kafka) 等流式数据源验证数据质量规则；同时指出它缺少数据可观测性、事件管理和内置报告，用户必须自行分析结果并构建工作流。<sup>[15](https://dqops.com/open-source-data-quality-tools/)</sup> 在 Gradient Flow 于 2022 年进行的一项从业者调查中，12% 的受访者表示其组织使用 Apache Griffin 做数据质量，而 Great Expectations 为 23%，Informatica 为 17%。<sup>[16](https://gradientflow.com/wp-content/uploads/2021/11/Gradient-Flow-Report-2022-State-of-Data-Engineering.pdf)</sup>

项目维护者自己在 0.7.0 设计讨论中记录了差距：数据质量定义不完整且不灵活、触发机制僵化、过度依赖内部数据比较、缺少 Slack 或微信等默认告警渠道，以及没有异常检测模块、阈值只能静态配置。提议的下一代架构要求采用基于 SQL 的规则，路由到包括 Spark、Hive、Flink 和 Presto 在内的不同查询引擎，并标准化采集、评估和告警阶段。<sup>[17](https://cwiki.apache.org/confluence/spaces/GRIFFIN/pages/217392225/The%2BDQ%2Bworkflow%2BArchitecture%2BProposal)</sup>

## 退役

终结通过 Apache 的标准治理流程到来。2025 年 9 月 20 日，Apache 软件基金会董事会主席 Sander Striker 向 Griffin 开发邮件列表发出征集维护者的呼吁，称该项目近几个月没有可见活动，也未提交所需的季度董事会报告。他设定了一个条件：在 9 月 24 日董事会会议之前，至少要有三名活跃的 PMC 成员承诺承担监督、维护和季度报告工作；否则董事会将推进决议，将项目移入 Apache Attic。<sup>[18](https://www.mail-archive.com/dev%40griffin.apache.org/msg03119.html)</sup>

没有足够的维护者群体站出来，项目于 2025 年 9 月退役。Attic 流程旨在为已走到生命周期终点的项目提供监督，而不重建社区或发布版本，该流程在跟踪工单 ATTIC-246 下于 2025 年 11 月完成迁移。<sup>[2](https://attic.apache.org/projects/griffin.html)</sup><sup> • </sup><sup>[3](https://attic.apache.org/tracking.html)</sup> GitHub 镜像于 2025 年 11 月 24 日归档并设为只读。<sup>[8](https://github.com/apache/griffin)</sup> 从 0.1.5-incubating 到 0.6.0 的归档版本仍可通过 Apache 发布目录和分发归档获取，项目的网站、wiki、邮件列表存档和问题跟踪器仍作为只读资源保留。<sup>[7](https://release-catalog.apache.org/griffin/archive.html)</sup><sup> • </sup><sup>[2](https://attic.apache.org/projects/griffin.html)</sup>

## References

1. [Griffin Project Incubation Status, Apache Incubator](https://incubator.apache.org/projects/griffin.html)
2. [Griffin, The Apache Attic](https://attic.apache.org/projects/griffin.html)
3. [Process Tracking, The Apache Attic](https://attic.apache.org/tracking.html)
4. [griffin/griffin-doc/intro.md, apache/griffin on GitHub](https://github.com/apache/griffin/blob/master/griffin-doc/intro.md)
5. [Dimensions of Data Quality, Apache Griffin documentation](https://apache.googlesource.com/griffin/%2B/HEAD/griffin-doc/measure/dimensions.md?autodive=0%2F%2F)
6. [griffin-doc/roadmap.md, Apache Griffin 0.6.0 branch](https://apache.googlesource.com/griffin/%2Bshow/refs/heads/griffin-0.6.0-rc0/griffin-doc/roadmap.md)
7. [Apache Griffin archived releases, Apache Release Catalog](https://release-catalog.apache.org/griffin/archive.html)
8. [apache/griffin on GitHub (archived repository)](https://github.com/apache/griffin)
9. [apache/griffin, GitHub Explorer activity data](https://ghe.derekchia.com/repo/apache/griffin)
10. [Apache Griffin project website (retired)](http://griffin.incubator.apache.org/)
11. [7. Apache Griffin DSL Guidance, Griffin Wiki](https://cwiki.apache.org/confluence/spaces/GRIFFIN/pages/69405833/7.%2BApache%2BGriffin%2BDSL%2BGuidance)
12. [Lisa Ehrlinger and Wolfram Wöß (2022). A Survey of Data Quality Measurement and Monitoring Tools. Frontiers in Big Data 5:850611.](https://pmc.ncbi.nlm.nih.gov/articles/PMC9009315/)
13. [Ehrlinger and Wöß (2022), Frontiers in Big Data full text](https://www.frontiersin.org/journals/big-data/articles/10.3389/fdata.2022.850611/full)
14. [Choosing the right data quality solution in 2025, Smile](https://smile.eu/en/publications-and-events/choosing-right-data-quality-solution-2025)
15. [7 Open-Source Data Quality Tools to Use in 2025, DQOps](https://dqops.com/open-source-data-quality-tools/)
16. [2022 State of Data Engineering: Emerging Challenges with Data Security & Quality, Gradient Flow](https://gradientflow.com/wp-content/uploads/2021/11/Gradient-Flow-Report-2022-State-of-Data-Engineering.pdf)
17. [The DQ workflow Architecture Proposal, Griffin Wiki](https://cwiki.apache.org/confluence/spaces/GRIFFIN/pages/217392225/The%2BDQ%2Bworkflow%2BArchitecture%2BProposal)
18. [Sander Striker (September 20, 2025). [CALL FOR MAINTAINERS] Apache Griffin, dev@griffin.apache.org archive](https://www.mail-archive.com/dev%40griffin.apache.org/msg03119.html)

---
*Initially written Oct 26, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Databases and data systems › Data mining, warehousing, and big data › Big data platforms and frameworks

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/apache-griffin

English original: https://www.edgepedia.org/apache-griffin
