EX-18: Automated DQ Scorecard & Trust Badge Query
Track: Quality & Assertions • Difficulty: Intermediate • Mastery Points: 150 PTS
Business Problem Scenario
Global DynaDatum Bank issues Data Trust Badges to certified lakehouse data products based on their rolling 30-day quality test execution pass rates. Under enterprise governance policy, trust tiers are defined by unambiguous mathematical thresholds: data products achieving a pass rate of 98.0% or higher earn a 'Certified' badge; products scoring between 90.0% and 97.99% receive a 'Conditional' badge; products scoring below 90.0% are branded 'Uncertified' and blocked from regulatory reporting.
Engineering Objective
Write a trust badge evaluation query against gov.dq_results for the data product gold.deposits_return. • Expected Columns: product_name, total_records, passed_records, dq_score, trust_tier • Scoring & Tier Logic: - dq_score = round((passed_records * 100.0) / total_records, 2) - trust_tier: * dq_score >= 98.0 -> 'Certified' * dq_score >= 90.0 AND dq_score < 98.0 -> 'Conditional' * dq_score < 90.0 -> 'Uncertified' - Filter for product_name = 'gold.deposits_return'. Key Concepts: - Data Trust Badge: Institutional certification of a data product's compliance and operational readiness.
Target Table: gov.dq_results (product_name STRING, total_records INT, passed_records INT)
Verification & Architecture Insights
Trust badges provide visible assurance to regulatory consumers and board members that numbers have continuously passed objective ISO 8000 automated checks.