EX-7: Adding Governance Warnings to Databricks Column Comments (The £78M Discrepancy)
Track: Metadata & Glossaries • Difficulty: Beginner • Mastery Points: 100 PTS
Business Problem Scenario
In Databricks Unity Catalog (Runtime 16.1+ / Databricks SQL), column comments act as living, inline active governance documentation visible to every engineer and BI analyst directly inside their query editor. At Global DynaDatum Bank, an analyst calculated liquidity coverage ratios using available_balance (which reflects pending debit authorizations and temporary overdraft allowances) rather than ledger_balance (the settled accounting balance). This error produced a £78,000,000 misstatement on the quarterly return. To prevent recurrence, Global DynaDatum Bank requires explicit column documentation featuring anti-examples that explicitly forbid improper attribute substitution.
Engineering Objective
Write the COMMENT ON COLUMN silver.core_balances.ledger_balance SQL command. • Target Column: silver.core_balances.ledger_balance • Documentation Acceptance Criteria: - Must explicitly cite business glossary identifier GLOSS-FIN-0012. - Must provide an explicit anti-example warning prohibiting the substitution of available_balance for statutory regulatory and balance sheet calculations. • Runtime Compatibility: Databricks Runtime 16.1+ or Databricks SQL warehouse. Key Concepts: - Active Governance: Embedding definitions, compliance rules, and anti-examples directly into the catalog metadata where SQL users work. - Anti-Example: A negative documentation guideline explicitly specifying what NOT to do to prevent dangerous semantic calculation defects.
Target Table: silver.core_balances (account_id STRING, balance_date DATE, ledger_balance DECIMAL(18,2), available_balance DECIMAL(18,2))
Verification & Architecture Insights
Enterprise active metadata frameworks and ISO/IEC 11179 guidelines emphasize clear negative anti-examples; defining what a metric is NOT drastically reduces business definition drift and cross-departmental reporting errors.