[{"data":1,"prerenderedAt":2540},["ShallowReactive",2],{"navigation":3,"\u002Fblog\u002Fdata_quality":62,"\u002Fblog\u002Fdata_quality-surround":2535},[4],{"title":5,"path":6,"stem":7,"children":8,"page":61},"Blog","\u002Fblog","blog",[9,13,17,21,25,29,33,37,41,45,49,53,57],{"title":10,"path":11,"stem":12},"Data Catalog 3.0: Rise of the Active Metadata Platform","\u002Fblog\u002Fdata-catalog-3","blog\u002Fdata-catalog-3",{"title":14,"path":15,"stem":16},"Data Quality on Databricks: A Framework for Lakeflow Jobs","\u002Fblog\u002Fdata_quality","blog\u002Fdata_quality",{"title":18,"path":19,"stem":20},"Data Governance on Databricks: A Unity Catalog Runbook","\u002Fblog\u002Fdatabrics-governance","blog\u002Fdatabrics-governance",{"title":22,"path":23,"stem":24},"Data Platform Solution Architect: Roles, Responsibilities and Design Steps","\u002Fblog\u002Fdataplatform_architect","blog\u002Fdataplatform_architect",{"title":26,"path":27,"stem":28},"dbt on Databricks: Data Transformation Pipelines","\u002Fblog\u002Fdbt-on-databricks","blog\u002Fdbt-on-databricks",{"title":30,"path":31,"stem":32},"Deploying Azure Resources with VS Code","\u002Fblog\u002Fdeploying-azure-resource-with-vs-code","blog\u002Fdeploying-azure-resource-with-vs-code",{"title":34,"path":35,"stem":36},"Dynamic Management Views (DMVs)","\u002Fblog\u002Fdynamic-management-views","blog\u002Fdynamic-management-views",{"title":38,"path":39,"stem":40},"General Delta Table Processing","\u002Fblog\u002Fgeneral-delta-table","blog\u002Fgeneral-delta-table",{"title":42,"path":43,"stem":44},"Microsoft Fabric as an All-in-One Analytics Solution","\u002Fblog\u002Fmicrosoft-fabric","blog\u002Fmicrosoft-fabric",{"title":46,"path":47,"stem":48},"Orchard Core Shapes: Demystifying the View Data Model","\u002Fblog\u002Forchard-core-shapes","blog\u002Forchard-core-shapes",{"title":50,"path":51,"stem":52},"Power BI DAX Masterclass","\u002Fblog\u002Fpower-bi-dax-masterclass","blog\u002Fpower-bi-dax-masterclass",{"title":54,"path":55,"stem":56},"Power BI Incremental Refresh","\u002Fblog\u002Fpower-bi-incremental-refresh","blog\u002Fpower-bi-incremental-refresh",{"title":58,"path":59,"stem":60},"Set Power BI Row-Level Security to SAP Cost Center","\u002Fblog\u002Fpower-bi-row-level-security","blog\u002Fpower-bi-row-level-security",false,{"id":63,"title":14,"author":64,"body":68,"date":2528,"description":2529,"extension":2530,"image":2531,"meta":2532,"minRead":452,"navigation":473,"path":15,"seo":2533,"stem":16,"__hash__":2534},"blog\u002Fblog\u002Fdata_quality.md",{"name":65,"avatar":66},"Radek Řezáč",{"src":67,"alt":65},"\u002Faboutme.png",{"type":69,"value":70,"toc":2509},"minimark",[71,80,85,176,179,183,254,257,267,274,277,360,363,511,521,535,539,542,592,656,660,670,751,954,957,994,997,1077,1081,1096,1211,1218,1222,1228,1422,1425,1495,1514,1518,1525,1537,1615,1622,1632,1652,1664,1668,1677,1737,1740,1746,1789,1793,1796,1856,1880,1884,1897,1908,2001,2011,2222,2233,2237,2240,2262,2270,2274,2281,2321,2324,2328,2395,2410,2416,2423,2427,2447,2450,2498,2502,2505],[72,73,74,75,79],"p",{},"Data quality on a lakehouse usually ends up in one of two places: scattered ",[76,77,78],"code",{},"assert"," statements inside notebooks, or a monitoring tool that tells you about a broken table the morning after the dashboard showed wrong numbers. This article describes a framework that sits between the two. Every rule is data in a table, seeded from Git; every load passes through one runner that decides per row whether to warn, quarantine or fail; every result is logged before anything is raised; and alerts reach the group that owns the data. It is based on a runbook written for a finance data platform migrating from SQL Server to Databricks Lakeflow Jobs; the names here are generic.",[81,82,84],"h2",{"id":83},"the-setup","The Setup",[86,87,88,101],"table",{},[89,90,91],"thead",{},[92,93,94,98],"tr",{},[95,96,97],"th",{},"Item",[95,99,100],{},"Choice",[102,103,104,113,141,153,161],"tbody",{},[92,105,106,110],{},[107,108,109],"td",{},"Environments",[107,111,112],{},"dev, test and prod, one catalog per environment",[92,114,115,118],{},[107,116,117],{},"Schemas",[107,119,120,123,124,123,127,123,130,133,134,140],{},[76,121,122],{},"erp_bronze",", ",[76,125,126],{},"erp_silver",[76,128,129],{},"finance_gold",[76,131,132],{},"control",", and one shared ",[135,136,137],"strong",{},[76,138,139],{},"dq"," schema for every DQ object",[92,142,143,146],{},[107,144,145],{},"Execution",[107,147,148,149,152],{},"Lakeflow Jobs, one task per migrated procedure, idempotent Delta ",[76,150,151],{},"MERGE INTO",". No declarative pipelines, so no built-in expectations and no event log",[92,154,155,158],{},[107,156,157],{},"Deployment",[107,159,160],{},"A Databricks Asset Bundle deployed by CI\u002FCD under a CI service principal (OAuth M2M, no personal tokens)",[92,162,163,166],{},[107,164,165],{},"Ownership",[107,167,168,171,172,175],{},[76,169,170],{},"dp-\u003Cenv>-erp-engineers"," (Bronze\u002FSilver rules), ",[76,173,174],{},"dp-\u003Cenv>-finance-engineers"," (Gold rules), a finance business owner who signs Gold thresholds",[72,177,178],{},"Because the jobs are plain tasks rather than declarative pipelines, the framework rebuilds what expectations would give you, and adds what they do not: quarantine instead of silently dropping rows, thresholds, routing and a scorecard.",[81,180,182],{"id":181},"three-lines-of-defence","Three Lines of Defence",[86,184,185,198],{},[89,186,187],{},[92,188,189,192,195],{},[95,190,191],{},"Line",[95,193,194],{},"What",[95,196,197],{},"Gates the write?",[102,199,200,223,241],{},[92,201,202,205,220],{},[107,203,204],{},"1 Engine",[107,206,207,208,211,212,215,216,219],{},"Schema enforcement, Delta ",[76,209,210],{},"NOT NULL"," \u002F ",[76,213,214],{},"CHECK",", informational PK\u002FFK, a ",[76,217,218],{},"dq_flags"," column",[107,221,222],{},"Yes, and it cannot be skipped",[92,224,225,228,238],{},[107,226,227],{},"2 Runner",[107,229,230,233,234,237],{},[76,231,232],{},"apply_dq()"," in every job task: rules from ",[76,235,236],{},"dq.rules",", evaluated in one pass, evidence written first",[107,239,240],{},"Yes",[92,242,243,246,249],{},[107,244,245],{},"3 Monitoring",[107,247,248],{},"Data profiling and anomaly detection",[107,250,251],{},[135,252,253],{},"Never",[72,255,256],{},"One load, end to end:",[258,259,265],"pre",{"className":260,"code":262,"language":263,"meta":264},[261],"language-text","transform ─► rank + hash key ─► apply_dq() ─┬─► MERGE INTO target          (rows that passed; dq_flags on Silver)\n                                            ├─► MERGE INTO dq.quarantine_* (held-back rows, JSON + failed rule ids)\n                                            ├─► dq.violation_log, then dq.run_summary   (evidence, always)\n                                            └─► raise DQFailure            (only after the evidence is committed)\nafter the load:  dq_evaluate_thresholds ─► dq.threshold_breach ─► SQL alert ─► owner group (dq.contacts)\nasynchronously:  data profiling + anomaly detection ─► metric tables in dq ─► drift alerts (never gate)\n","text","",[76,266,262],{"__ignoreMap":264},[81,268,270,271,273],{"id":269},"the-dq-schema","The ",[76,272,139],{}," Schema",[72,275,276],{},"Everything lives in one schema, created by idempotent DDL that the deploy job runs after every bundle deploy:",[86,278,279,289],{},[89,280,281],{},[92,282,283,286],{},[95,284,285],{},"Table",[95,287,288],{},"Holds",[102,290,291,300,310,320,330,340,350],{},[92,292,293,297],{},[107,294,295],{},[76,296,236],{},[107,298,299],{},"Every rule: target table, layer, dimension, type, scope, SQL expression, action, severity, owner group, validity dates",[92,301,302,307],{},[107,303,304],{},[76,305,306],{},"dq.thresholds",[107,308,309],{},"Alert thresholds per table or rule, with the accountable group and escalation",[92,311,312,317],{},[107,313,314],{},[76,315,316],{},"dq.contacts",[107,318,319],{},"Notification routing per owner group; individuals are exceptions that expire",[92,321,322,327],{},[107,323,324],{},[76,325,326],{},"dq.violation_log",[107,328,329],{},"One row per rule execution",[92,331,332,337],{},[107,333,334],{},[76,335,336],{},"dq.run_summary",[107,338,339],{},"One row per runner call — written last, so it marks completion",[92,341,342,347],{},[107,343,344],{},[76,345,346],{},"dq.threshold_breach",[107,348,349],{},"Breaches, their notification and acknowledgement",[92,351,352,357],{},[107,353,354],{},[76,355,356],{},"dq.quarantine_\u003Csource>_\u003Centity>",[107,358,359],{},"Rows held back by a quarantine rule",[72,361,362],{},"The rule catalogue protects itself with constraints:",[258,364,368],{"className":365,"code":366,"language":367,"meta":264,"style":264},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","CREATE TABLE IF NOT EXISTS dq.rules (\n    rule_id         STRING    NOT NULL,   -- stable, e.g. 'SIL_ERP_TRADE_ID_NOT_NULL'\n    target_table    STRING    NOT NULL,   -- 'erp_silver.trade'\n    layer           STRING    NOT NULL,   -- bronze | silver | gold | control\n    dimension       STRING    NOT NULL,   -- one of the six dimensions\n    rule_type       STRING    NOT NULL,\n    rule_scope      STRING    NOT NULL,   -- ROW | DATASET\n    rule_expression STRING    NOT NULL,   -- SQL boolean; only TRUE passes\n    action          STRING    NOT NULL,   -- WARN | QUARANTINE | FAIL\n    severity        STRING    NOT NULL,   -- INFO | WARNING | CRITICAL (reporting only)\n    owner_group     STRING    NOT NULL,\n    enabled         BOOLEAN   NOT NULL,\n    valid_from      DATE      NOT NULL,\n    valid_to        DATE\n    -- rule_name, description, updated_at, updated_by\n) COMMENT 'Every data-quality rule applied by the DQ runner. Seeded from Git only.';\n\nALTER TABLE dq.rules ADD CONSTRAINT valid_action\n  CHECK (action IN ('WARN', 'QUARANTINE', 'FAIL'));\nALTER TABLE dq.rules ADD CONSTRAINT valid_dimension\n  CHECK (dimension IN ('consistency','accuracy','validity','completeness','timeliness','uniqueness'));\nALTER TABLE dq.rules ADD CONSTRAINT dataset_rules_cannot_quarantine\n  CHECK (NOT (rule_scope = 'DATASET' AND action = 'QUARANTINE'));\n","sql",[76,369,370,378,384,390,396,402,408,414,420,426,432,438,444,450,456,462,468,475,481,487,493,499,505],{"__ignoreMap":264},[371,372,375],"span",{"class":373,"line":374},"line",1,[371,376,377],{},"CREATE TABLE IF NOT EXISTS dq.rules (\n",[371,379,381],{"class":373,"line":380},2,[371,382,383],{},"    rule_id         STRING    NOT NULL,   -- stable, e.g. 'SIL_ERP_TRADE_ID_NOT_NULL'\n",[371,385,387],{"class":373,"line":386},3,[371,388,389],{},"    target_table    STRING    NOT NULL,   -- 'erp_silver.trade'\n",[371,391,393],{"class":373,"line":392},4,[371,394,395],{},"    layer           STRING    NOT NULL,   -- bronze | silver | gold | control\n",[371,397,399],{"class":373,"line":398},5,[371,400,401],{},"    dimension       STRING    NOT NULL,   -- one of the six dimensions\n",[371,403,405],{"class":373,"line":404},6,[371,406,407],{},"    rule_type       STRING    NOT NULL,\n",[371,409,411],{"class":373,"line":410},7,[371,412,413],{},"    rule_scope      STRING    NOT NULL,   -- ROW | DATASET\n",[371,415,417],{"class":373,"line":416},8,[371,418,419],{},"    rule_expression STRING    NOT NULL,   -- SQL boolean; only TRUE passes\n",[371,421,423],{"class":373,"line":422},9,[371,424,425],{},"    action          STRING    NOT NULL,   -- WARN | QUARANTINE | FAIL\n",[371,427,429],{"class":373,"line":428},10,[371,430,431],{},"    severity        STRING    NOT NULL,   -- INFO | WARNING | CRITICAL (reporting only)\n",[371,433,435],{"class":373,"line":434},11,[371,436,437],{},"    owner_group     STRING    NOT NULL,\n",[371,439,441],{"class":373,"line":440},12,[371,442,443],{},"    enabled         BOOLEAN   NOT NULL,\n",[371,445,447],{"class":373,"line":446},13,[371,448,449],{},"    valid_from      DATE      NOT NULL,\n",[371,451,453],{"class":373,"line":452},14,[371,454,455],{},"    valid_to        DATE\n",[371,457,459],{"class":373,"line":458},15,[371,460,461],{},"    -- rule_name, description, updated_at, updated_by\n",[371,463,465],{"class":373,"line":464},16,[371,466,467],{},") COMMENT 'Every data-quality rule applied by the DQ runner. Seeded from Git only.';\n",[371,469,471],{"class":373,"line":470},17,[371,472,474],{"emptyLinePlaceholder":473},true,"\n",[371,476,478],{"class":373,"line":477},18,[371,479,480],{},"ALTER TABLE dq.rules ADD CONSTRAINT valid_action\n",[371,482,484],{"class":373,"line":483},19,[371,485,486],{},"  CHECK (action IN ('WARN', 'QUARANTINE', 'FAIL'));\n",[371,488,490],{"class":373,"line":489},20,[371,491,492],{},"ALTER TABLE dq.rules ADD CONSTRAINT valid_dimension\n",[371,494,496],{"class":373,"line":495},21,[371,497,498],{},"  CHECK (dimension IN ('consistency','accuracy','validity','completeness','timeliness','uniqueness'));\n",[371,500,502],{"class":373,"line":501},22,[371,503,504],{},"ALTER TABLE dq.rules ADD CONSTRAINT dataset_rules_cannot_quarantine\n",[371,506,508],{"class":373,"line":507},23,[371,509,510],{},"  CHECK (NOT (rule_scope = 'DATASET' AND action = 'QUARANTINE'));\n",[72,512,513,516,517,520],{},[76,514,515],{},"ALTER TABLE … ADD CONSTRAINT"," is not idempotent, so the deploy job adds a constraint only when it is missing from ",[76,518,519],{},"information_schema.check_constraints",".",[72,522,523,524,534],{},"Grants follow the same model as the rest of the platform: the CI service principal owns the objects, workload service principals read the rules and write results, engineers read, and consumers see only the scorecard views. ",[135,525,526,527,530,531,533],{},"No human group holds ",[76,528,529],{},"MODIFY"," on ",[76,532,139],{}," in production."," Each quarantine table gets the same classification tags, row filter and column masks as the table it protects — quarantine must never become the place where restricted data is readable.",[81,536,538],{"id":537},"line-1-engine-controls-in-the-ddl","Line 1: Engine Controls in the DDL",[72,540,541],{},"For every Silver and Gold table, before its first load:",[543,544,545,560,576,582],"ol",{},[546,547,548,551,552,555,556,559],"li",{},[135,549,550],{},"Keep schema enforcement on."," Silver and Gold writes never set ",[76,553,554],{},"mergeSchema"," or auto-merge. A schema change is DDL in the bundle. Bronze may evolve additively, but each change is a ",[76,557,558],{},"SCHEMA_DRIFT"," warning that gets reviewed.",[546,561,562,571,572,575],{},[135,563,564,565,567,568,570],{},"Use Delta ",[76,566,210],{}," and ",[76,569,214],{}," for invariants only"," — Gold business keys, ",[76,573,574],{},"valid_from \u003C= valid_to"," on SCD2 dimensions, closed-list status columns. A violation aborts the whole transaction, so never use a constraint for something that should be quarantined.",[546,577,578,581],{},[135,579,580],{},"Declare informational primary and foreign keys"," on Gold for documentation and lineage. They are not enforced, so uniqueness is still a rule.",[546,583,584,591],{},[135,585,586,587,590],{},"Add ",[76,588,589],{},"dq_flags ARRAY\u003CSTRING> NOT NULL"," to every Silver table",", holding the ids of the warning rules a row violated.",[258,593,595],{"className":365,"code":594,"language":367,"meta":264,"style":264},"CREATE TABLE IF NOT EXISTS finance_gold.dim_trade (\n    trade_key  STRING    NOT NULL,\n    trade_id   BIGINT    NOT NULL,\n    folder_id  BIGINT    NOT NULL,\n    valid_from TIMESTAMP NOT NULL,\n    valid_to   TIMESTAMP,\n    is_current BOOLEAN   NOT NULL,\n    CONSTRAINT pk_dim_trade PRIMARY KEY (trade_key, valid_from)      -- informational\n) CLUSTER BY (trade_id);\n\nALTER TABLE finance_gold.dim_trade ADD CONSTRAINT scd2_interval\n  CHECK (valid_to IS NULL OR valid_from \u003C= valid_to);\n",[76,596,597,602,607,612,617,622,627,632,637,642,646,651],{"__ignoreMap":264},[371,598,599],{"class":373,"line":374},[371,600,601],{},"CREATE TABLE IF NOT EXISTS finance_gold.dim_trade (\n",[371,603,604],{"class":373,"line":380},[371,605,606],{},"    trade_key  STRING    NOT NULL,\n",[371,608,609],{"class":373,"line":386},[371,610,611],{},"    trade_id   BIGINT    NOT NULL,\n",[371,613,614],{"class":373,"line":392},[371,615,616],{},"    folder_id  BIGINT    NOT NULL,\n",[371,618,619],{"class":373,"line":398},[371,620,621],{},"    valid_from TIMESTAMP NOT NULL,\n",[371,623,624],{"class":373,"line":404},[371,625,626],{},"    valid_to   TIMESTAMP,\n",[371,628,629],{"class":373,"line":410},[371,630,631],{},"    is_current BOOLEAN   NOT NULL,\n",[371,633,634],{"class":373,"line":416},[371,635,636],{},"    CONSTRAINT pk_dim_trade PRIMARY KEY (trade_key, valid_from)      -- informational\n",[371,638,639],{"class":373,"line":422},[371,640,641],{},") CLUSTER BY (trade_id);\n",[371,643,644],{"class":373,"line":428},[371,645,474],{"emptyLinePlaceholder":473},[371,647,648],{"class":373,"line":434},[371,649,650],{},"ALTER TABLE finance_gold.dim_trade ADD CONSTRAINT scd2_interval\n",[371,652,653],{"class":373,"line":440},[371,654,655],{},"  CHECK (valid_to IS NULL OR valid_from \u003C= valid_to);\n",[81,657,659],{"id":658},"the-rule-vocabulary","The Rule Vocabulary",[72,661,270,662,665,666,669],{},[76,663,664],{},"action"," decides behaviour, exactly like a declarative-pipeline expectation's ",[76,667,668],{},"ON VIOLATION"," clause — except that a dropped row is kept in quarantine instead of discarded:",[86,671,672,689],{},[89,673,674],{},[92,675,676,680,683,686],{},[95,677,678],{},[76,679,664],{},[95,681,682],{},"Expectation analogue",[95,684,685],{},"The row",[95,687,688],{},"The task",[102,690,691,712,733],{},[92,692,693,698,703,709],{},[107,694,695],{},[76,696,697],{},"WARN",[107,699,700],{},[76,701,702],{},"expect",[107,704,705,706,708],{},"kept; rule id in ",[76,707,218],{}," on Silver",[107,710,711],{},"continues; violation logged",[92,713,714,719,724,730],{},[107,715,716],{},[76,717,718],{},"QUARANTINE",[107,720,721],{},[76,722,723],{},"expect_or_drop",[107,725,726,727],{},"not written; held in ",[76,728,729],{},"dq.quarantine_*",[107,731,732],{},"continues; counters record the loss",[92,734,735,740,745,748],{},[107,736,737],{},[76,738,739],{},"FAIL",[107,741,742],{},[76,743,744],{},"expect_or_fail",[107,746,747],{},"nothing written",[107,749,750],{},"result logged first, then the task fails",[86,752,753,771],{},[89,754,755],{},[92,756,757,762,765,768],{},[95,758,759],{},[76,760,761],{},"rule_type",[95,763,764],{},"Scope",[95,766,767],{},"Dimension",[95,769,770],{},"Example expression",[102,772,773,791,808,825,841,857,875,891,908,924,937],{},[92,774,775,780,783,786],{},[107,776,777],{},[76,778,779],{},"NOT_NULL",[107,781,782],{},"ROW",[107,784,785],{},"completeness",[107,787,788],{},[76,789,790],{},"trade_id IS NOT NULL",[92,792,793,798,800,803],{},[107,794,795],{},[76,796,797],{},"RANGE",[107,799,782],{},[107,801,802],{},"accuracy",[107,804,805],{},[76,806,807],{},"pl_amount BETWEEN -1e9 AND 1e9",[92,809,810,815,817,820],{},[107,811,812],{},[76,813,814],{},"ALLOWED_VALUES",[107,816,782],{},[107,818,819],{},"validity",[107,821,822],{},[76,823,824],{},"pl_type IN ('NPV','ACCRUAL','REALIZED')",[92,826,827,832,834,836],{},[107,828,829],{},[76,830,831],{},"PATTERN",[107,833,782],{},[107,835,819],{},[107,837,838],{},[76,839,840],{},"isin RLIKE '^[A-Z]{2}[A-Z0-9]{9}[0-9]$'",[92,842,843,848,850,852],{},[107,844,845],{},[76,846,847],{},"REFERENTIAL",[107,849,782],{},[107,851,785],{},[107,853,854],{},[76,855,856],{},"folder_id IN (SELECT folder_id FROM finance_gold.dim_folder)",[92,858,859,864,867,870],{},[107,860,861],{},[76,862,863],{},"UNIQUENESS",[107,865,866],{},"DATASET",[107,868,869],{},"uniqueness",[107,871,872],{},[76,873,874],{},"COUNT(*) = COUNT(DISTINCT trade_key)",[92,876,877,882,884,886],{},[107,878,879],{},[76,880,881],{},"ROW_COUNT",[107,883,866],{},[107,885,785],{},[107,887,888],{},[76,889,890],{},"COUNT(*) >= 1000",[92,892,893,898,900,903],{},[107,894,895],{},[76,896,897],{},"FRESHNESS",[107,899,866],{},[107,901,902],{},"timeliness",[107,904,905],{},[76,906,907],{},"MAX(business_date) >= CURRENT_DATE() - 1",[92,909,910,915,917,919],{},[107,911,912],{},[76,913,914],{},"VOLUME_ANOMALY",[107,916,866],{},[107,918,785],{},[107,920,921],{},[76,922,923],{},"COUNT(*) BETWEEN 0.7 * :avg_30d AND 1.3 * :avg_30d",[92,925,926,930,932,934],{},[107,927,928],{},[76,929,558],{},[107,931,866],{},[107,933,819],{},[107,935,936],{},"evaluated by the runner",[92,938,939,944,946,949],{},[107,940,941],{},[76,942,943],{},"RECONCILIATION",[107,945,866],{},[107,947,948],{},"consistency",[107,950,951],{},[76,952,953],{},"ABS(SUM(pl_amount) - :source_total) \u003C 0.01",[72,955,956],{},"Two rules that are easy to get wrong:",[958,959,960,985],"ul",{},[546,961,962,965,966,969,970,973,974,977,978,981,982,520],{},[135,963,964],{},"NULL is a violation."," ",[76,967,968],{},"pl_amount BETWEEN …"," is ",[76,971,972],{},"NULL"," when ",[76,975,976],{},"pl_amount"," is null, and only ",[76,979,980],{},"TRUE"," passes. If a null is acceptable, say so: ",[76,983,984],{},"pl_amount IS NULL OR pl_amount BETWEEN …",[546,986,987,990,991,993],{},[135,988,989],{},"A dataset rule cannot quarantine"," — there is no row to hold back. The constraint on ",[76,992,236],{}," enforces it.",[72,995,996],{},"Layer defaults:",[86,998,999,1012],{},[89,1000,1001],{},[92,1002,1003,1006,1009],{},[95,1004,1005],{},"Layer",[95,1007,1008],{},"Default",[95,1010,1011],{},"Belongs here",[102,1013,1014,1034,1050,1063],{},[92,1015,1016,1019,1024],{},[107,1017,1018],{},"Bronze",[107,1020,1021,1023],{},[76,1022,697],{}," only — never reject the source record",[107,1025,1026,1027,1029,1030,1033],{},"Row count, freshness, schema drift. Reconciliation with the source system is ",[76,1028,739],{}," for the ",[135,1031,1032],{},"downstream Silver task",", not for the Bronze append",[92,1035,1036,1039,1047],{},[107,1037,1038],{},"Silver",[107,1040,1041,1043,1044,1046],{},[76,1042,718],{}," for row rules; ",[76,1045,739],{}," for duplicate business keys",[107,1048,1049],{},"Not-null keys, allowed values, ranges, referential checks, Silver vs Bronze row counts",[92,1051,1052,1055,1060],{},[107,1053,1054],{},"Gold",[107,1056,1057,1059],{},[76,1058,739],{}," — publication stops",[107,1061,1062],{},"Missing dimension members, invalid keys, broken aggregates, measure-level reconciliation",[92,1064,1065,1069,1074],{},[107,1066,1067],{},[76,1068,132],{},[107,1070,1071,1073],{},[76,1072,739],{}," on the gate",[107,1075,1076],{},"A missing or stale readiness row fails the gate instead of letting a task read partial data",[81,1078,1080],{"id":1079},"rules-from-a-version-controlled-seed","Rules From a Version-Controlled Seed",[72,1082,1083,1084,1087,1088,1091,1092,1095],{},"Rules are data, but ",[135,1085,1086],{},"reproducible data",". They live in ",[76,1089,1090],{},"resources\u002Fdq\u002Frules.sql"," and the deploy job applies them with ",[76,1093,1094],{},"MERGE",", so a rule is added without a code change and no rule exists in production that is not in Git.",[258,1097,1099],{"className":365,"code":1098,"language":367,"meta":264,"style":264},"MERGE INTO dq.rules AS t\nUSING (\n  SELECT * FROM VALUES\n    ('SIL_ERP_TRADE_ID_NOT_NULL', 'erp_silver.trade', 'silver', 'completeness',\n     'NOT_NULL', 'ROW', 'trade_id IS NOT NULL',\n     'QUARANTINE', 'CRITICAL', 'dp-${env}-erp-engineers', true, DATE'2026-09-01', CAST(NULL AS DATE)),\n    ('SIL_ERP_TRADE_UNIQUE', 'erp_silver.trade', 'silver', 'uniqueness',\n     'UNIQUENESS', 'DATASET', 'COUNT(*) = COUNT(DISTINCT trade_key)',\n     'FAIL', 'CRITICAL', 'dp-${env}-erp-engineers', true, DATE'2026-09-01', CAST(NULL AS DATE)),\n    ('GLD_PL_FOLDER_FK', 'finance_gold.fact_profit_and_loss', 'gold', 'completeness',\n     'REFERENTIAL', 'ROW', 'folder_id IN (SELECT folder_id FROM finance_gold.dim_folder)',\n     'FAIL', 'CRITICAL', 'dp-${env}-finance-engineers', true, DATE'2026-09-01', CAST(NULL AS DATE))\n  AS s(rule_id, target_table, layer, dimension, rule_type, rule_scope, rule_expression,\n       action, severity, owner_group, enabled, valid_from, valid_to)\n) AS s\nON t.rule_id = s.rule_id\nWHEN MATCHED THEN UPDATE SET\n  rule_expression = s.rule_expression, action = s.action, enabled = s.enabled, valid_to = s.valid_to,\n  -- ... every other seeded column\n  updated_at = current_timestamp(), updated_by = current_user()\nWHEN NOT MATCHED THEN INSERT (\u002F* seeded columns *\u002F ..., updated_at, updated_by)\nVALUES (\u002F* s.* *\u002F ..., current_timestamp(), current_user());\n",[76,1100,1101,1106,1111,1116,1121,1126,1131,1136,1141,1146,1151,1156,1161,1166,1171,1176,1181,1186,1191,1196,1201,1206],{"__ignoreMap":264},[371,1102,1103],{"class":373,"line":374},[371,1104,1105],{},"MERGE INTO dq.rules AS t\n",[371,1107,1108],{"class":373,"line":380},[371,1109,1110],{},"USING (\n",[371,1112,1113],{"class":373,"line":386},[371,1114,1115],{},"  SELECT * FROM VALUES\n",[371,1117,1118],{"class":373,"line":392},[371,1119,1120],{},"    ('SIL_ERP_TRADE_ID_NOT_NULL', 'erp_silver.trade', 'silver', 'completeness',\n",[371,1122,1123],{"class":373,"line":398},[371,1124,1125],{},"     'NOT_NULL', 'ROW', 'trade_id IS NOT NULL',\n",[371,1127,1128],{"class":373,"line":404},[371,1129,1130],{},"     'QUARANTINE', 'CRITICAL', 'dp-${env}-erp-engineers', true, DATE'2026-09-01', CAST(NULL AS DATE)),\n",[371,1132,1133],{"class":373,"line":410},[371,1134,1135],{},"    ('SIL_ERP_TRADE_UNIQUE', 'erp_silver.trade', 'silver', 'uniqueness',\n",[371,1137,1138],{"class":373,"line":416},[371,1139,1140],{},"     'UNIQUENESS', 'DATASET', 'COUNT(*) = COUNT(DISTINCT trade_key)',\n",[371,1142,1143],{"class":373,"line":422},[371,1144,1145],{},"     'FAIL', 'CRITICAL', 'dp-${env}-erp-engineers', true, DATE'2026-09-01', CAST(NULL AS DATE)),\n",[371,1147,1148],{"class":373,"line":428},[371,1149,1150],{},"    ('GLD_PL_FOLDER_FK', 'finance_gold.fact_profit_and_loss', 'gold', 'completeness',\n",[371,1152,1153],{"class":373,"line":434},[371,1154,1155],{},"     'REFERENTIAL', 'ROW', 'folder_id IN (SELECT folder_id FROM finance_gold.dim_folder)',\n",[371,1157,1158],{"class":373,"line":440},[371,1159,1160],{},"     'FAIL', 'CRITICAL', 'dp-${env}-finance-engineers', true, DATE'2026-09-01', CAST(NULL AS DATE))\n",[371,1162,1163],{"class":373,"line":446},[371,1164,1165],{},"  AS s(rule_id, target_table, layer, dimension, rule_type, rule_scope, rule_expression,\n",[371,1167,1168],{"class":373,"line":452},[371,1169,1170],{},"       action, severity, owner_group, enabled, valid_from, valid_to)\n",[371,1172,1173],{"class":373,"line":458},[371,1174,1175],{},") AS s\n",[371,1177,1178],{"class":373,"line":464},[371,1179,1180],{},"ON t.rule_id = s.rule_id\n",[371,1182,1183],{"class":373,"line":470},[371,1184,1185],{},"WHEN MATCHED THEN UPDATE SET\n",[371,1187,1188],{"class":373,"line":477},[371,1189,1190],{},"  rule_expression = s.rule_expression, action = s.action, enabled = s.enabled, valid_to = s.valid_to,\n",[371,1192,1193],{"class":373,"line":483},[371,1194,1195],{},"  -- ... every other seeded column\n",[371,1197,1198],{"class":373,"line":489},[371,1199,1200],{},"  updated_at = current_timestamp(), updated_by = current_user()\n",[371,1202,1203],{"class":373,"line":495},[371,1204,1205],{},"WHEN NOT MATCHED THEN INSERT (\u002F* seeded columns *\u002F ..., updated_at, updated_by)\n",[371,1207,1208],{"class":373,"line":501},[371,1209,1210],{},"VALUES (\u002F* s.* *\u002F ..., current_timestamp(), current_user());\n",[72,1212,1213,1214,1217],{},"A rule is retired by setting ",[76,1215,1216],{},"valid_to",", never by deleting it. Onboarding a migrated object is always the same three actions: add its rules to the seed, add one passing and one failing test row per rule, and raise a pull request.",[81,1219,1221],{"id":1220},"line-2-the-runner","Line 2: The Runner",[72,1223,1224,1225,1227],{},"One function, ",[76,1226,232],{},", is called by every transformation task between building its DataFrame and writing it. It reads the active rules for the target, evaluates all row rules in one aggregate, splits the data, runs the dataset rules on the rows that will be written, writes the evidence, and only then raises if a blocking rule failed. A condensed version, with the helpers elided:",[258,1229,1233],{"className":1230,"code":1231,"language":1232,"meta":264,"style":264},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","def apply_dq(df, target_table, run_id, spark, task_key=None, params=None, reconcile=False):\n    \"\"\"Validate df against the active rules for target_table and return the rows that may be written.\"\"\"\n    rules = active_rules(spark, target_table, reconcile)\n    results = []\n\n    # row rules become flag columns; only TRUE passes, so NULL is a violation\n    flagged, row_rules = df, []\n    for r in (r for r in rules if r.rule_scope == \"ROW\"):\n        candidate = flagged.withColumn(f\"_dq_{r.rule_id}\",\n                                       F.expr(f\"coalesce(NOT ({r.rule_expression}), true)\"))\n        try:\n            candidate.schema          # forces analysis now; Spark Connect is lazy otherwise\n            flagged = candidate\n            row_rules.append(r)\n        except AnalysisException as exc:\n            results.append(_result(r, run_id, target_table, task_key, 0, 0, \"ERROR\", str(exc)))\n\n    flagged = add_failed_warn_and_blocked_columns(flagged, row_rules)\n    agg = one_pass_aggregate(flagged, row_rules)          # rows_in, rows_quarantined, per-rule failures\n    results += row_results(row_rules, agg)\n\n    # dataset rules run on the rows that will actually be written; parameters are bound, not concatenated\n    valid = flagged.where(~F.col(\"_dq_blocked\"))\n    valid.createOrReplaceTempView(\"_dq_input\")\n    results += dataset_results(spark, rules, params, valid)\n\n    if agg[\"rows_quarantined\"]:\n        _write_quarantine(flagged.where(F.col(\"_dq_blocked\")), target_table, run_id, spark)\n\n    hard = [x for x in results if (x[\"status\"] == \"FAILED\" and x[\"action\"] == \"FAIL\")\n            or (x[\"status\"] == \"ERROR\" and x[\"action\"] in (\"FAIL\", \"QUARANTINE\"))]\n    _log(spark, results, agg, outcome(hard, agg, results))   # violation_log first, run_summary last\n    if hard:\n        raise DQFailure(f\"{target_table}: blocking rule(s) failed: {[x['rule_id'] for x in hard]}\")\n\n    return with_dq_flags_on_silver(valid, target_table)\n","python",[76,1234,1235,1240,1245,1250,1255,1259,1264,1269,1274,1279,1284,1289,1294,1299,1304,1309,1314,1318,1323,1328,1333,1337,1342,1347,1353,1359,1364,1370,1376,1381,1387,1393,1399,1405,1411,1416],{"__ignoreMap":264},[371,1236,1237],{"class":373,"line":374},[371,1238,1239],{},"def apply_dq(df, target_table, run_id, spark, task_key=None, params=None, reconcile=False):\n",[371,1241,1242],{"class":373,"line":380},[371,1243,1244],{},"    \"\"\"Validate df against the active rules for target_table and return the rows that may be written.\"\"\"\n",[371,1246,1247],{"class":373,"line":386},[371,1248,1249],{},"    rules = active_rules(spark, target_table, reconcile)\n",[371,1251,1252],{"class":373,"line":392},[371,1253,1254],{},"    results = []\n",[371,1256,1257],{"class":373,"line":398},[371,1258,474],{"emptyLinePlaceholder":473},[371,1260,1261],{"class":373,"line":404},[371,1262,1263],{},"    # row rules become flag columns; only TRUE passes, so NULL is a violation\n",[371,1265,1266],{"class":373,"line":410},[371,1267,1268],{},"    flagged, row_rules = df, []\n",[371,1270,1271],{"class":373,"line":416},[371,1272,1273],{},"    for r in (r for r in rules if r.rule_scope == \"ROW\"):\n",[371,1275,1276],{"class":373,"line":422},[371,1277,1278],{},"        candidate = flagged.withColumn(f\"_dq_{r.rule_id}\",\n",[371,1280,1281],{"class":373,"line":428},[371,1282,1283],{},"                                       F.expr(f\"coalesce(NOT ({r.rule_expression}), true)\"))\n",[371,1285,1286],{"class":373,"line":434},[371,1287,1288],{},"        try:\n",[371,1290,1291],{"class":373,"line":440},[371,1292,1293],{},"            candidate.schema          # forces analysis now; Spark Connect is lazy otherwise\n",[371,1295,1296],{"class":373,"line":446},[371,1297,1298],{},"            flagged = candidate\n",[371,1300,1301],{"class":373,"line":452},[371,1302,1303],{},"            row_rules.append(r)\n",[371,1305,1306],{"class":373,"line":458},[371,1307,1308],{},"        except AnalysisException as exc:\n",[371,1310,1311],{"class":373,"line":464},[371,1312,1313],{},"            results.append(_result(r, run_id, target_table, task_key, 0, 0, \"ERROR\", str(exc)))\n",[371,1315,1316],{"class":373,"line":470},[371,1317,474],{"emptyLinePlaceholder":473},[371,1319,1320],{"class":373,"line":477},[371,1321,1322],{},"    flagged = add_failed_warn_and_blocked_columns(flagged, row_rules)\n",[371,1324,1325],{"class":373,"line":483},[371,1326,1327],{},"    agg = one_pass_aggregate(flagged, row_rules)          # rows_in, rows_quarantined, per-rule failures\n",[371,1329,1330],{"class":373,"line":489},[371,1331,1332],{},"    results += row_results(row_rules, agg)\n",[371,1334,1335],{"class":373,"line":495},[371,1336,474],{"emptyLinePlaceholder":473},[371,1338,1339],{"class":373,"line":501},[371,1340,1341],{},"    # dataset rules run on the rows that will actually be written; parameters are bound, not concatenated\n",[371,1343,1344],{"class":373,"line":507},[371,1345,1346],{},"    valid = flagged.where(~F.col(\"_dq_blocked\"))\n",[371,1348,1350],{"class":373,"line":1349},24,[371,1351,1352],{},"    valid.createOrReplaceTempView(\"_dq_input\")\n",[371,1354,1356],{"class":373,"line":1355},25,[371,1357,1358],{},"    results += dataset_results(spark, rules, params, valid)\n",[371,1360,1362],{"class":373,"line":1361},26,[371,1363,474],{"emptyLinePlaceholder":473},[371,1365,1367],{"class":373,"line":1366},27,[371,1368,1369],{},"    if agg[\"rows_quarantined\"]:\n",[371,1371,1373],{"class":373,"line":1372},28,[371,1374,1375],{},"        _write_quarantine(flagged.where(F.col(\"_dq_blocked\")), target_table, run_id, spark)\n",[371,1377,1379],{"class":373,"line":1378},29,[371,1380,474],{"emptyLinePlaceholder":473},[371,1382,1384],{"class":373,"line":1383},30,[371,1385,1386],{},"    hard = [x for x in results if (x[\"status\"] == \"FAILED\" and x[\"action\"] == \"FAIL\")\n",[371,1388,1390],{"class":373,"line":1389},31,[371,1391,1392],{},"            or (x[\"status\"] == \"ERROR\" and x[\"action\"] in (\"FAIL\", \"QUARANTINE\"))]\n",[371,1394,1396],{"class":373,"line":1395},32,[371,1397,1398],{},"    _log(spark, results, agg, outcome(hard, agg, results))   # violation_log first, run_summary last\n",[371,1400,1402],{"class":373,"line":1401},33,[371,1403,1404],{},"    if hard:\n",[371,1406,1408],{"class":373,"line":1407},34,[371,1409,1410],{},"        raise DQFailure(f\"{target_table}: blocking rule(s) failed: {[x['rule_id'] for x in hard]}\")\n",[371,1412,1414],{"class":373,"line":1413},35,[371,1415,474],{"emptyLinePlaceholder":473},[371,1417,1419],{"class":373,"line":1418},36,[371,1420,1421],{},"    return with_dq_flags_on_silver(valid, target_table)\n",[72,1423,1424],{},"Properties any change to the runner must preserve:",[958,1426,1427,1437,1443,1449,1466,1472,1483],{},[546,1428,1429,1432,1433,1436],{},[135,1430,1431],{},"One pass"," for all row rules, and no ",[76,1434,1435],{},".cache()"," (not supported on serverless).",[546,1438,1439,1442],{},[135,1440,1441],{},"NULL is a violation",", so no row falls between the valid and the quarantined split.",[546,1444,1445,1448],{},[135,1446,1447],{},"A row can fail several rules","; all of their ids are kept.",[546,1450,1451,1458,1459,211,1461,1463,1464,520],{},[135,1452,1453,1454,1457],{},"A broken expression is an ",[76,1455,1456],{},"ERROR"," result."," It blocks the write when the rule protects data (",[76,1460,739],{},[76,1462,718],{},") and is only reported for a ",[76,1465,697],{},[546,1467,1468,1471],{},[135,1469,1470],{},"Dataset rules see the written rows",", so quarantined rows do not distort a uniqueness check.",[546,1473,1474,965,1477,1479,1480,1482],{},[135,1475,1476],{},"Evidence order:",[76,1478,326],{}," first, ",[76,1481,336],{}," last. The summary row is the completion marker.",[546,1484,1485,1488,1489,530,1491,1494],{},[135,1486,1487],{},"Quarantine is idempotent"," through a ",[76,1490,1094],{},[76,1492,1493],{},"run_id"," and a hash of the record, so a repair run adds nothing twice.",[72,1496,1497,1498,1500,1501,1503,1504,1508,1509,1511,1512,520],{},"Unit tests run on every pull request: a clean DataFrame passes; a warning row is kept and flagged; a quarantined row appears in quarantine exactly once after two calls with the same ",[76,1499,1493],{},"; a NULL-evaluating rule fails; a ",[76,1502,739],{}," rule raises ",[1505,1506,1507],"em",{},"after"," both result tables have rows; a broken expression behaves correctly on ",[76,1510,697],{}," and on ",[76,1513,739],{},[81,1515,1517],{"id":1516},"wiring-the-runner-into-every-task","Wiring the Runner Into Every Task",[72,1519,1520,1521,1524],{},"The runner always sits ",[135,1522,1523],{},"between the transformation and the write",". Nothing writes to Silver or Gold without it.",[72,1526,1527,1530,1531,1533,1534,1536],{},[135,1528,1529],{},"Silver: deduplicate, gate, merge."," Deduplicate in the ",[76,1532,1094],{}," source with a ranking window on the business key, hash composite keys into one key column, and let the ",[76,1535,863],{}," rule assert the result — this replaces the unique index of the old database.",[258,1538,1540],{"className":1230,"code":1539,"language":1232,"meta":264,"style":264},"latest = Window.partitionBy(\"trade_key\").orderBy(F.col(\"update_ts\").desc(), F.col(\"trade_id\").desc())\nsilver_df = (\n    build_silver_trade(spark.table(\"erp_bronze.trade\"))        # the migrated procedure\n    .withColumn(\"trade_key\", F.sha2(F.concat_ws(\"||\", \"trade_id\", \"trade_version\"), 256))\n    .withColumn(\"_rn\", F.row_number().over(latest))\n    .where(\"_rn = 1\").drop(\"_rn\")\n)\n\nclean_df = apply_dq(silver_df, \"erp_silver.trade\", run_id, spark, task_key=\"s2_trade\")\n\n(DeltaTable.forName(spark, \"erp_silver.trade\").alias(\"t\")\n    .merge(clean_df.alias(\"s\"), \"t.trade_key = s.trade_key\")\n    .whenMatchedUpdateAll()\n    .whenNotMatchedInsertAll()\n    .execute())\n",[76,1541,1542,1547,1552,1557,1562,1567,1572,1577,1581,1586,1590,1595,1600,1605,1610],{"__ignoreMap":264},[371,1543,1544],{"class":373,"line":374},[371,1545,1546],{},"latest = Window.partitionBy(\"trade_key\").orderBy(F.col(\"update_ts\").desc(), F.col(\"trade_id\").desc())\n",[371,1548,1549],{"class":373,"line":380},[371,1550,1551],{},"silver_df = (\n",[371,1553,1554],{"class":373,"line":386},[371,1555,1556],{},"    build_silver_trade(spark.table(\"erp_bronze.trade\"))        # the migrated procedure\n",[371,1558,1559],{"class":373,"line":392},[371,1560,1561],{},"    .withColumn(\"trade_key\", F.sha2(F.concat_ws(\"||\", \"trade_id\", \"trade_version\"), 256))\n",[371,1563,1564],{"class":373,"line":398},[371,1565,1566],{},"    .withColumn(\"_rn\", F.row_number().over(latest))\n",[371,1568,1569],{"class":373,"line":404},[371,1570,1571],{},"    .where(\"_rn = 1\").drop(\"_rn\")\n",[371,1573,1574],{"class":373,"line":410},[371,1575,1576],{},")\n",[371,1578,1579],{"class":373,"line":416},[371,1580,474],{"emptyLinePlaceholder":473},[371,1582,1583],{"class":373,"line":422},[371,1584,1585],{},"clean_df = apply_dq(silver_df, \"erp_silver.trade\", run_id, spark, task_key=\"s2_trade\")\n",[371,1587,1588],{"class":373,"line":428},[371,1589,474],{"emptyLinePlaceholder":473},[371,1591,1592],{"class":373,"line":434},[371,1593,1594],{},"(DeltaTable.forName(spark, \"erp_silver.trade\").alias(\"t\")\n",[371,1596,1597],{"class":373,"line":440},[371,1598,1599],{},"    .merge(clean_df.alias(\"s\"), \"t.trade_key = s.trade_key\")\n",[371,1601,1602],{"class":373,"line":446},[371,1603,1604],{},"    .whenMatchedUpdateAll()\n",[371,1606,1607],{"class":373,"line":452},[371,1608,1609],{},"    .whenNotMatchedInsertAll()\n",[371,1611,1612],{"class":373,"line":458},[371,1613,1614],{},"    .execute())\n",[72,1616,1617,1618,1621],{},"The same ",[76,1619,1620],{},"{{job.run_id}}"," is passed to Bronze, Silver, Gold and reconciliation tasks, so every DQ row joins to the load and to the task that produced it.",[72,1623,1624,1627,1628,1631],{},[135,1625,1626],{},"Bronze: observe, then reconcile separately."," The Bronze append only applies warnings, so it always lands. A separate reconcile task per feed computes the source-side figures for the same business date and calls ",[76,1629,1630],{},"apply_dq(..., params={\"source_row_count\": n}, reconcile=True)",". A failure there stops the Silver task, not the append.",[72,1633,1634,1640,1641,1644,1645,1648,1649,1651],{},[135,1635,1636,1637,1639],{},"Gold: ",[76,1638,739],{}," stops publication."," A failed Gold rule fails the task, and nothing downstream — corrections, materialised-view refreshes, status logging, BI extract refreshes — runs on data that did not pass. A pure ",[76,1642,1643],{},"sql_task"," cannot call Python, so a Gold task that must be gated becomes a notebook task that loads the same SQL file, calls ",[76,1646,1647],{},"apply_dq"," and writes with ",[76,1650,1094],{},". The SQL itself is unchanged.",[72,1653,1654,1657,1658,1660,1661,1663],{},[135,1655,1656],{},"Control gates."," A readiness check is a ",[76,1659,132],{}," rule with action ",[76,1662,739],{},": a missing or stale row stops the downstream task.",[81,1665,1667],{"id":1666},"quarantine","Quarantine",[72,1669,1670,1671,1673,1674,1676],{},"One table per quarantined entity, always in ",[76,1672,139],{},", named ",[76,1675,356],{},". The record is stored as JSON, which tolerates source drift, together with every failed rule id:",[258,1678,1680],{"className":365,"code":1679,"language":367,"meta":264,"style":264},"CREATE TABLE IF NOT EXISTS dq.quarantine_erp_trade (\n    run_id           STRING        NOT NULL,\n    quarantined_at   TIMESTAMP     NOT NULL,\n    target_table     STRING        NOT NULL,\n    failed_rule_ids  ARRAY\u003CSTRING> NOT NULL,   -- every violated rule, not just the first\n    source_row       STRING        NOT NULL,   -- the record as JSON\n    record_hash      STRING        NOT NULL,   -- idempotency key with run_id\n    reprocess_status STRING        NOT NULL,   -- NEW | IN_REVIEW | REPROCESSED | REJECTED\n    reprocessed_at   TIMESTAMP,\n    review_note      STRING\n) CLUSTER BY (quarantined_at);\n",[76,1681,1682,1687,1692,1697,1702,1707,1712,1717,1722,1727,1732],{"__ignoreMap":264},[371,1683,1684],{"class":373,"line":374},[371,1685,1686],{},"CREATE TABLE IF NOT EXISTS dq.quarantine_erp_trade (\n",[371,1688,1689],{"class":373,"line":380},[371,1690,1691],{},"    run_id           STRING        NOT NULL,\n",[371,1693,1694],{"class":373,"line":386},[371,1695,1696],{},"    quarantined_at   TIMESTAMP     NOT NULL,\n",[371,1698,1699],{"class":373,"line":392},[371,1700,1701],{},"    target_table     STRING        NOT NULL,\n",[371,1703,1704],{"class":373,"line":398},[371,1705,1706],{},"    failed_rule_ids  ARRAY\u003CSTRING> NOT NULL,   -- every violated rule, not just the first\n",[371,1708,1709],{"class":373,"line":404},[371,1710,1711],{},"    source_row       STRING        NOT NULL,   -- the record as JSON\n",[371,1713,1714],{"class":373,"line":410},[371,1715,1716],{},"    record_hash      STRING        NOT NULL,   -- idempotency key with run_id\n",[371,1718,1719],{"class":373,"line":416},[371,1720,1721],{},"    reprocess_status STRING        NOT NULL,   -- NEW | IN_REVIEW | REPROCESSED | REJECTED\n",[371,1723,1724],{"class":373,"line":422},[371,1725,1726],{},"    reprocessed_at   TIMESTAMP,\n",[371,1728,1729],{"class":373,"line":428},[371,1730,1731],{},"    review_note      STRING\n",[371,1733,1734],{"class":373,"line":434},[371,1735,1736],{},") CLUSTER BY (quarantined_at);\n",[72,1738,1739],{},"The lifecycle:",[258,1741,1744],{"className":1742,"code":1743,"language":263,"meta":264},[261],"NEW ──► IN_REVIEW ──┬─► REPROCESSED   (sent back through the same runner and written)\n                    └─► REJECTED      (genuinely invalid; note recorded)\n",[76,1745,1743],{"__ignoreMap":264},[543,1747,1748,1754,1760,1783],{},[546,1749,1750,1753],{},[135,1751,1752],{},"Triage"," — the owner group reviews new rows within the agreed window; a backlog alert fires when it does not.",[546,1755,1756,1759],{},[135,1757,1758],{},"Fix at the source or fix the rule"," — a rule that quarantines correct data is a defect in the rule.",[546,1761,1762,1765,1766,1769,1770,1773,1774,1776,1777,1779,1780,520],{},[135,1763,1764],{},"Reprocess"," — a deployed job parses ",[76,1767,1768],{},"source_row"," back with ",[76,1771,1772],{},"from_json",", sends it through ",[76,1775,1647],{}," with a new ",[76,1778,1493],{}," and merges what passes. Status changes go through job parameters, never a console ",[76,1781,1782],{},"UPDATE",[546,1784,1785,1788],{},[135,1786,1787],{},"Retention"," — rows past the protected table's retention class are deleted by the same job. Quarantine is a holding area, not an archive.",[81,1790,1792],{"id":1791},"thresholds-and-contacts","Thresholds and Contacts",[72,1794,1795],{},"A single failed row should not page anyone; a trend should. Thresholds are seeded from Git like the rules:",[86,1797,1798,1810],{},[89,1799,1800],{},[92,1801,1802,1807],{},[95,1803,1804],{},[76,1805,1806],{},"metric",[95,1808,1809],{},"Meaning",[102,1811,1812,1822,1832,1842],{},[92,1813,1814,1819],{},[107,1815,1816],{},[76,1817,1818],{},"quarantine_rate_pct",[107,1820,1821],{},"rows quarantined \u002F rows in",[92,1823,1824,1829],{},[107,1825,1826],{},[76,1827,1828],{},"fail_rate_pct",[107,1830,1831],{},"failed rules \u002F rules applied, or 100 − pass rate of one rule",[92,1833,1834,1839],{},[107,1835,1836],{},[76,1837,1838],{},"rows_quarantined",[107,1840,1841],{},"absolute rows held back",[92,1843,1844,1849],{},[107,1845,1846],{},[76,1847,1848],{},"rows_written_min",[107,1850,1851,1852,1855],{},"rows written; with ",[76,1853,1854],{},"LT"," it catches an empty or short load",[958,1857,1858,1864,1871],{},[546,1859,1860,1863],{},[76,1861,1862],{},"consecutive_runs"," is at least 1; use 2 or more on rates so one noisy run does not alert.",[546,1865,1866,1867,1870],{},"Every Gold threshold carries the business owner in ",[76,1868,1869],{},"approved_by"," — engineering proposes, the business signs.",[546,1872,1873,1875,1876,1879],{},[76,1874,316],{}," is keyed on the ",[135,1877,1878],{},"owner group",". A named individual is a documented exception with an expiry date. Channels are distribution lists or notification destination ids, never webhook URLs.",[81,1881,1883],{"id":1882},"alerting","Alerting",[72,1885,1886,1887,1892,1893,1896],{},"Alerting has two independent paths: a ",[135,1888,1889,1891],{},[76,1890,739],{}," fails the job",", so the job's own failure notification fires at once; and ",[135,1894,1895],{},"threshold breaches"," are evaluated after the load and routed to the owner group.",[72,1898,1899,1900,1903,1904,1907],{},"The loading task never decides who is paged. A separate SQL task, ",[76,1901,1902],{},"dq_evaluate_thresholds",", is the last task of each job, with ",[76,1905,1906],{},"run_if: ALL_DONE"," so failed runs are counted too:",[258,1909,1913],{"className":1910,"code":1911,"language":1912,"meta":264,"style":264},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","- task_key: dq_evaluate_thresholds\n  depends_on: [{ task_key: set_status_log }]\n  run_if: ALL_DONE\n  sql_task:\n    warehouse_id: ${var.warehouse_id}\n    file: { path: ..\u002Fsrc\u002Fdq\u002Fevaluate_thresholds.sql }\n","yaml",[76,1914,1915,1932,1952,1962,1970,1980],{"__ignoreMap":264},[371,1916,1917,1921,1925,1928],{"class":373,"line":374},[371,1918,1920],{"class":1919},"sMK4o","-",[371,1922,1924],{"class":1923},"swJcz"," task_key",[371,1926,1927],{"class":1919},":",[371,1929,1931],{"class":1930},"sfazB"," dq_evaluate_thresholds\n",[371,1933,1934,1937,1939,1942,1944,1946,1949],{"class":373,"line":380},[371,1935,1936],{"class":1923},"  depends_on",[371,1938,1927],{"class":1919},[371,1940,1941],{"class":1919}," [{",[371,1943,1924],{"class":1923},[371,1945,1927],{"class":1919},[371,1947,1948],{"class":1930}," set_status_log",[371,1950,1951],{"class":1919}," }]\n",[371,1953,1954,1957,1959],{"class":373,"line":386},[371,1955,1956],{"class":1923},"  run_if",[371,1958,1927],{"class":1919},[371,1960,1961],{"class":1930}," ALL_DONE\n",[371,1963,1964,1967],{"class":373,"line":392},[371,1965,1966],{"class":1923},"  sql_task",[371,1968,1969],{"class":1919},":\n",[371,1971,1972,1975,1977],{"class":373,"line":398},[371,1973,1974],{"class":1923},"    warehouse_id",[371,1976,1927],{"class":1919},[371,1978,1979],{"class":1930}," ${var.warehouse_id}\n",[371,1981,1982,1985,1987,1990,1993,1995,1998],{"class":373,"line":404},[371,1983,1984],{"class":1923},"    file",[371,1986,1927],{"class":1919},[371,1988,1989],{"class":1919}," {",[371,1991,1992],{"class":1923}," path",[371,1994,1927],{"class":1919},[371,1996,1997],{"class":1930}," ..\u002Fsrc\u002Fdq\u002Fevaluate_thresholds.sql",[371,1999,2000],{"class":1919}," }\n",[72,2002,2003,2004,2007,2008,2010],{},"It records a breach only when ",[135,2005,2006],{},"every run in the window"," is in breach, and a ",[76,2009,1094],{}," on threshold and run means a re-run never records it twice. Each owner group then gets a Databricks SQL alert on its open breaches, deployed as a bundle resource:",[258,2012,2014],{"className":1910,"code":2013,"language":1912,"meta":264,"style":264},"resources:\n  alerts:\n    dq_breach_erp:\n      display_name: \"[${bundle.target}] DQ breach - ERP engineering\"\n      warehouse_id: ${var.warehouse_id}\n      query_text: >\n        SELECT COUNT(*) AS open_breaches\n        FROM `${var.catalog}`.dq.threshold_breach\n        WHERE owner_group = 'dp-${var.env}-erp-engineers' AND notified_at IS NULL\n      evaluation:\n        comparison_operator: GREATER_THAN\n        source: { name: open_breaches, display: open_breaches }\n        threshold: { value: { double_value: 0 } }\n        notification:\n          subscriptions:\n            - destination_id: ${var.dq_destination_id}\n      schedule:\n        quartz_cron_schedule: \"0 *\u002F15 * * * ?\"\n        timezone_id: Europe\u002FPrague\n",[76,2015,2016,2023,2030,2037,2053,2062,2073,2078,2083,2088,2095,2105,2134,2164,2171,2178,2191,2198,2212],{"__ignoreMap":264},[371,2017,2018,2021],{"class":373,"line":374},[371,2019,2020],{"class":1923},"resources",[371,2022,1969],{"class":1919},[371,2024,2025,2028],{"class":373,"line":380},[371,2026,2027],{"class":1923},"  alerts",[371,2029,1969],{"class":1919},[371,2031,2032,2035],{"class":373,"line":386},[371,2033,2034],{"class":1923},"    dq_breach_erp",[371,2036,1969],{"class":1919},[371,2038,2039,2042,2044,2047,2050],{"class":373,"line":392},[371,2040,2041],{"class":1923},"      display_name",[371,2043,1927],{"class":1919},[371,2045,2046],{"class":1919}," \"",[371,2048,2049],{"class":1930},"[${bundle.target}] DQ breach - ERP engineering",[371,2051,2052],{"class":1919},"\"\n",[371,2054,2055,2058,2060],{"class":373,"line":398},[371,2056,2057],{"class":1923},"      warehouse_id",[371,2059,1927],{"class":1919},[371,2061,1979],{"class":1930},[371,2063,2064,2067,2069],{"class":373,"line":404},[371,2065,2066],{"class":1923},"      query_text",[371,2068,1927],{"class":1919},[371,2070,2072],{"class":2071},"s7zQu"," >\n",[371,2074,2075],{"class":373,"line":410},[371,2076,2077],{"class":1930},"        SELECT COUNT(*) AS open_breaches\n",[371,2079,2080],{"class":373,"line":416},[371,2081,2082],{"class":1930},"        FROM `${var.catalog}`.dq.threshold_breach\n",[371,2084,2085],{"class":373,"line":422},[371,2086,2087],{"class":1930},"        WHERE owner_group = 'dp-${var.env}-erp-engineers' AND notified_at IS NULL\n",[371,2089,2090,2093],{"class":373,"line":428},[371,2091,2092],{"class":1923},"      evaluation",[371,2094,1969],{"class":1919},[371,2096,2097,2100,2102],{"class":373,"line":434},[371,2098,2099],{"class":1923},"        comparison_operator",[371,2101,1927],{"class":1919},[371,2103,2104],{"class":1930}," GREATER_THAN\n",[371,2106,2107,2110,2112,2114,2117,2119,2122,2125,2128,2130,2132],{"class":373,"line":440},[371,2108,2109],{"class":1923},"        source",[371,2111,1927],{"class":1919},[371,2113,1989],{"class":1919},[371,2115,2116],{"class":1923}," name",[371,2118,1927],{"class":1919},[371,2120,2121],{"class":1930}," open_breaches",[371,2123,2124],{"class":1919},",",[371,2126,2127],{"class":1923}," display",[371,2129,1927],{"class":1919},[371,2131,2121],{"class":1930},[371,2133,2000],{"class":1919},[371,2135,2136,2139,2141,2143,2146,2148,2150,2153,2155,2159,2162],{"class":373,"line":446},[371,2137,2138],{"class":1923},"        threshold",[371,2140,1927],{"class":1919},[371,2142,1989],{"class":1919},[371,2144,2145],{"class":1923}," value",[371,2147,1927],{"class":1919},[371,2149,1989],{"class":1919},[371,2151,2152],{"class":1923}," double_value",[371,2154,1927],{"class":1919},[371,2156,2158],{"class":2157},"sbssI"," 0",[371,2160,2161],{"class":1919}," }",[371,2163,2000],{"class":1919},[371,2165,2166,2169],{"class":373,"line":452},[371,2167,2168],{"class":1923},"        notification",[371,2170,1969],{"class":1919},[371,2172,2173,2176],{"class":373,"line":458},[371,2174,2175],{"class":1923},"          subscriptions",[371,2177,1969],{"class":1919},[371,2179,2180,2183,2186,2188],{"class":373,"line":464},[371,2181,2182],{"class":1919},"            -",[371,2184,2185],{"class":1923}," destination_id",[371,2187,1927],{"class":1919},[371,2189,2190],{"class":1930}," ${var.dq_destination_id}\n",[371,2192,2193,2196],{"class":373,"line":470},[371,2194,2195],{"class":1923},"      schedule",[371,2197,1969],{"class":1919},[371,2199,2200,2203,2205,2207,2210],{"class":373,"line":477},[371,2201,2202],{"class":1923},"        quartz_cron_schedule",[371,2204,1927],{"class":1919},[371,2206,2046],{"class":1919},[371,2208,2209],{"class":1930},"0 *\u002F15 * * * ?",[371,2211,2052],{"class":1919},[371,2213,2214,2217,2219],{"class":373,"line":483},[371,2215,2216],{"class":1923},"        timezone_id",[371,2218,1927],{"class":1919},[371,2220,2221],{"class":1930}," Europe\u002FPrague\n",[72,2223,2224,2225,2228,2229,2232],{},"After a notification, ",[76,2226,2227],{},"notified_at"," is written back, so an alert that was never sent is itself visible; an unacknowledged breach escalates after an agreed number of hours. One more alert per quarantine table watches the age of the oldest ",[76,2230,2231],{},"NEW"," row — quarantine that nobody empties is data loss with extra steps.",[81,2234,2236],{"id":2235},"line-3-monitoring-that-never-gates","Line 3: Monitoring That Never Gates",[72,2238,2239],{},"The runner checks only what someone wrote down. Monitoring finds what nobody predicted: drift in distributions, null rates and volumes, and tables that stopped updating.",[958,2241,2242,2251],{},[546,2243,2244,2247,2248,2250],{},[135,2245,2246],{},"Data profiling on Gold"," — a time-series profile on each fact (on the business date) and a snapshot profile on each dimension, with metric tables in ",[76,2249,139],{},", declared as bundle resources and scheduled after Gold publication. SQL alerts on the drift metrics go to the owner group.",[546,2252,2253,2256,2257,567,2259,2261],{},[135,2254,2255],{},"Anomaly detection per schema"," — freshness and completeness on Bronze, Silver and Gold without a rule per table, as an independent check next to the ",[76,2258,897],{},[76,2260,881],{}," rules.",[72,2263,2264,2267,2268,520],{},[135,2265,2266],{},"Monitoring never gates a job."," A finding becomes a gate only when it is promoted to a rule in ",[76,2269,236],{},[81,2271,2273],{"id":2272},"the-scorecard","The Scorecard",[72,2275,2276,2277,2280],{},"One AI\u002FBI dashboard over the run summary, the violation log, the quarantine tables and the monitor metrics. Consumers get ",[76,2278,2279],{},"SELECT"," on scorecard views only.",[258,2282,2284],{"className":365,"code":2283,"language":367,"meta":264,"style":264},"-- scorecard per table and quality dimension, last 30 days\nSELECT target_table, dimension,\n       ROUND(100.0 * SUM(rows_checked - rows_failed) \u002F NULLIF(SUM(rows_checked), 0), 3) AS pass_rate_pct,\n       COUNT_IF(status \u003C> 'PASSED') AS failed_executions\nFROM dq.violation_log\nWHERE check_timestamp >= current_date() - INTERVAL 30 DAYS\nGROUP BY ALL ORDER BY target_table, dimension;\n",[76,2285,2286,2291,2296,2301,2306,2311,2316],{"__ignoreMap":264},[371,2287,2288],{"class":373,"line":374},[371,2289,2290],{},"-- scorecard per table and quality dimension, last 30 days\n",[371,2292,2293],{"class":373,"line":380},[371,2294,2295],{},"SELECT target_table, dimension,\n",[371,2297,2298],{"class":373,"line":386},[371,2299,2300],{},"       ROUND(100.0 * SUM(rows_checked - rows_failed) \u002F NULLIF(SUM(rows_checked), 0), 3) AS pass_rate_pct,\n",[371,2302,2303],{"class":373,"line":392},[371,2304,2305],{},"       COUNT_IF(status \u003C> 'PASSED') AS failed_executions\n",[371,2307,2308],{"class":373,"line":398},[371,2309,2310],{},"FROM dq.violation_log\n",[371,2312,2313],{"class":373,"line":404},[371,2314,2315],{},"WHERE check_timestamp >= current_date() - INTERVAL 30 DAYS\n",[371,2317,2318],{"class":373,"line":410},[371,2319,2320],{},"GROUP BY ALL ORDER BY target_table, dimension;\n",[72,2322,2323],{},"Because each rule has a dimension, \"the trade data is complete but not timely\" is a query, not an investigation.",[81,2325,2327],{"id":2326},"operating-it","Operating It",[86,2329,2330,2340],{},[89,2331,2332],{},[92,2333,2334,2337],{},[95,2335,2336],{},"Situation",[95,2338,2339],{},"What to do",[102,2341,2342,2350,2361,2369,2379,2387],{},[92,2343,2344,2347],{},[107,2345,2346],{},"Daily check",[107,2348,2349],{},"Every in-scope task has a run summary for today; no unacknowledged breach; quarantine backlog below threshold",[92,2351,2352,2358],{},[107,2353,2354,2355],{},"Job failed with ",[76,2356,2357],{},"DQFailure",[107,2359,2360],{},"Read the failing rule ids; decide whether the data or the rule is wrong; fix the source and repair-run, or fix the rule through a pull request. Never disable a rule in production by hand",[92,2362,2363,2366],{},[107,2364,2365],{},"Threshold breach",[107,2367,2368],{},"Acknowledge, investigate with the scorecard and quarantine, record the resolution",[92,2370,2371,2376],{},[107,2372,2373,2375],{},[76,2374,1456],{}," result",[107,2377,2378],{},"A rule no longer evaluates, usually after a schema change — fix it in the seed",[92,2380,2381,2384],{},[107,2382,2383],{},"Drift alert",[107,2385,2386],{},"Investigate; if it should gate future loads, add a rule",[92,2388,2389,2392],{},[107,2390,2391],{},"Bad Gold publication found later",[107,2393,2394],{},"Roll back with Delta time travel",[258,2396,2398],{"className":365,"code":2397,"language":367,"meta":264,"style":264},"DESCRIBE HISTORY finance_gold.fact_profit_and_loss;   -- match versions to dq.run_summary\nRESTORE TABLE finance_gold.fact_profit_and_loss TO VERSION AS OF 412;\n",[76,2399,2400,2405],{"__ignoreMap":264},[371,2401,2402],{"class":373,"line":374},[371,2403,2404],{},"DESCRIBE HISTORY finance_gold.fact_profit_and_loss;   -- match versions to dq.run_summary\n",[371,2406,2407],{"class":373,"line":380},[371,2408,2409],{},"RESTORE TABLE finance_gold.fact_profit_and_loss TO VERSION AS OF 412;\n",[72,2411,2412,2415],{},[76,2413,2414],{},"VACUUM"," retention on Gold must cover the agreed rollback window, or the version you need is gone.",[72,2417,2418,2419,2422],{},"During a migration, a daily parity job writes one row per measure, test case and reference system to ",[76,2420,2421],{},"dq.parity_*"," tables — never into Gold — and an out-of-tolerance row is a breach routed like any other.",[81,2424,2426],{"id":2425},"definition-of-done","Definition of Done",[958,2428,2429,2438],{},[546,2430,2431,2432,2435,2436,520],{},"A ",[135,2433,2434],{},"migrated object"," is done only when its rules are in the seed, each rule has a passing and a failing test row, and its results appear in ",[76,2437,336],{},[546,2439,2431,2440,2443,2444,2446],{},[135,2441,2442],{},"Gold serving view"," is certified only when its rules are registered, its failure behaviour is ",[76,2445,739],{},", its freshness rule and threshold are set, and its scorecard has been green for the agreed number of runs.",[72,2448,2449],{},"Acceptance checklist for the framework:",[958,2451,2452,2462,2468,2474,2477,2480,2487,2490,2493],{},[546,2453,2454,2456,2457,530,2459,2461],{},[76,2455,139],{}," objects deployed by CI in every environment; no human ",[76,2458,529],{},[76,2460,139],{}," in production",[546,2463,2464,2465,2467],{},"Every Silver and Gold write path calls ",[76,2466,1647],{}," (checked in CI)",[546,2469,2470,2471,2473],{},"Schema enforcement on; constraints present before first load; ",[76,2472,218],{}," on every Silver table",[546,2475,2476],{},"Every rule has a dimension, an owner group and two test rows",[546,2478,2479],{},"Every quarantined entity has its quarantine table, protected like its target, with a backlog alert",[546,2481,2482,2484,2485],{},[76,2483,1902],{}," is the last task of every job, with ",[76,2486,1906],{},[546,2488,2489],{},"Alerts and job failure notifications reach each owner group",[546,2491,2492],{},"Profiling on Gold and anomaly detection on every schema, with nothing gating on them",[546,2494,2495,2496],{},"Gold thresholds and parity tolerances carry ",[76,2497,1869],{},[81,2499,2501],{"id":2500},"conclusion","Conclusion",[72,2503,2504],{},"The framework rests on a few ideas: rules are data seeded from Git, one runner sits between every transformation and its write, every row either passes, is flagged, is quarantined or stops the load, evidence is written before anything fails, alerts go to groups rather than people, and monitoring informs but never blocks. The result is a platform where adding a check is a pull request, a bad load never reaches Gold, and data quality per table and dimension is a dashboard rather than a guess.",[2506,2507,2508],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":264,"searchDepth":380,"depth":380,"links":2510},[2511,2512,2513,2515,2516,2517,2518,2519,2520,2521,2522,2523,2524,2525,2526,2527],{"id":83,"depth":380,"text":84},{"id":181,"depth":380,"text":182},{"id":269,"depth":380,"text":2514},"The dq Schema",{"id":537,"depth":380,"text":538},{"id":658,"depth":380,"text":659},{"id":1079,"depth":380,"text":1080},{"id":1220,"depth":380,"text":1221},{"id":1516,"depth":380,"text":1517},{"id":1666,"depth":380,"text":1667},{"id":1791,"depth":380,"text":1792},{"id":1882,"depth":380,"text":1883},{"id":2235,"depth":380,"text":2236},{"id":2272,"depth":380,"text":2273},{"id":2326,"depth":380,"text":2327},{"id":2425,"depth":380,"text":2426},{"id":2500,"depth":380,"text":2501},"2026-10-27","A step-by-step data quality framework for a Databricks lakehouse built on Lakeflow Jobs: three lines of defence, a rule catalogue seeded from Git, a runner that warns, quarantines or fails, thresholds and alerts routed to owner groups, monitoring that never gates, and a scorecard.","md","\u002Fblog\u002Fdata_quality.png",{},{"title":14,"description":2529},"fiYlUsAmDqx359AXJvl8KOaTjqIFyG60cQn-O1uE6eI",[2536,2538],{"title":10,"path":11,"stem":12,"description":2537,"children":-1},"How the role of the data catalog has evolved from passive inventory to active metadata platform, and where it sits in the modern data stack and data mesh architecture.",{"title":18,"path":19,"stem":20,"description":2539,"children":-1},"A step-by-step model for governing a Databricks lakehouse with Unity Catalog: schemas as the governance unit, governed tags, three-tier roles from Entra ID, tag-driven row filters and column masks, service principals, and governance as code.",1795279086526]