名称: 数据迁移验证器 描述: 通过全面的验证检查,在迁移期间和迁移后验证数据完整性 允许使用的工具: [“Bash”, “Read”, “Write”, “Grep”, “Glob”, “Edit”]
数据迁移验证器技能
通过全面的验证检查和核对报告,在整个迁移过程中验证数据完整性。
目的
支持以下数据验证:
- 行数验证
- 校验和验证
- 样本数据对比
- 参照完整性检查
- 业务规则验证
功能
1. 行数验证
- 比较源/目标数据行数
- 按表/分区跟踪
- 识别差异
- 生成计数报告
2. 校验和验证
- 计算表校验和
- 比较哈希值
- 识别数据漂移
- 验证数据一致性
3. 样本数据对比
- 随机样本选择
- 字段级对比
- 统计抽样
- 置信度评分
4. 参照完整性检查
- 验证外键
- 检查孤立记录
- 验证关系
- 报告违规
5. 业务规则验证
- 应用自定义规则
- 检查数据约束
- 验证转换
- 验证计算
6. 核对报告
- 生成审计报告
- 跟踪差异
- 记录异常
- 提供签核报告
工具集成
| 工具 | 用途 | 集成方法 |
|---|---|---|
| Great Expectations | 数据验证 | 库 |
| dbt 测试 | 转换验证 | CLI |
| 自定义 SQL | 数据库检查 | CLI |
| DataGrip | 手动验证 | GUI |
| Apache Griffin | 数据质量 | API |
输出模式
{
"validationId": "string",
"timestamp": "ISO8601",
"results": {
"rowCounts": {
"tables": [
{
"name": "string",
"source": "number",
"target": "number",
"match": "boolean"
}
]
},
"checksums": {
"tables": [],
"overall": "string"
},
"samples": {
"checked": "number",
"matched": "number",
"discrepancies": []
},
"referentialIntegrity": {
"valid": "boolean",
"violations": []
},
"businessRules": {
"passed": "number",
"failed": "number",
"failures": []
}
},
"summary": {
"status": "passed|failed|warning",
"score": "number"
}
}
与迁移流程集成
- 数据库模式迁移: 迁移后验证
- 云迁移: 数据验证
相关技能
schema-comparator: 迁移前比较etl-pipeline-builder: 迁移执行
相关代理
data-integrity-validator: 编排验证database-migration-orchestrator: 用于验证