EX-6: Automated Governance Compliance Scan
Track: CDE & Governance • Difficulty: Advanced • Mastery Points: 200 PTS
Business Problem Scenario
To enforce governance standards automatically and prevent unowned columns from creeping into production, Global DynaDatum Bank requires CI/CD automated deployment pipelines to scan Databricks Unity Catalog system tables. Any Critical Data Element that lacks a named individual data owner or uses an external non-bank domain violates architectural policy and must be flagged as a compliance breach.
Engineering Objective
Write a governance compliance audit query comparing gov.cde_register c against system.information_schema.columns col. • Expected Columns: c.cde_id, c.table_name, c.column_name, c.data_owner • Join & Filter Logic: - Join gov.cde_register c to system.information_schema.columns col on c.table_name = col.table_name AND c.column_name = col.column_name. - Flag any CDE where c.data_owner IS NULL OR c.data_owner NOT LIKE '%@globaldynadatumbank.example%'. - The query must identify unowned columns as well as invalid third-party ownership domains. Key Concepts: - Automated Governance Scan: Continuous schema inspection asserting ownership metadata compliance prior to production promotion. - Fail-Closed Governance: Architectural security stance where missing or invalid ownership metadata blocks production deployment.
Target Table: system.information_schema.columns col, gov.cde_register c (cde_id STRING, table_name STRING, column_name STRING, data_owner STRING)
Verification & Architecture Insights
Automating governance compliance in CI/CD ensures no data engineer can promote an untagged CDE to production without executive ownership sign-off.