Skip to main content

Bridge: Databricks Unity Catalog → ODGS Runtime Enforcement Schemas

Project description

ODGS Databricks Bridge

License ODGS PyPI Python

Transform your Databricks Unity Catalog into active ODGS runtime enforcement schemas.

Unity Catalog describes your data. ODGS enforces it.

The ODGS Databricks Bridge is an institutional connector that translates Databricks Unity Catalog table and column metadata into cryptographically addressable ODGS enforcement schemas. It converts passive catalog definitions — column constraints, non-nullable fields, type assertions — into mechanically executable governance rules enforced at pipeline runtime.

Architecturally aligned with CEN/CENELEC JTC 25 and NEN 381 525 federated data sovereignty principles.


Architecture

flowchart LR
    subgraph UC["Databricks Unity Catalog"]
        CAT["Catalogs & Schemas"]
        TBL["Tables & Columns"]
        CON["Constraints\n(NOT NULL, Types)"]
    end

    subgraph Bridge["odgs-databricks-bridge"]
        T["DatabricksBridge\n.sync()"]
        TR["Transformer\n→ ODGS Schema"]
    end

    subgraph ODGS["ODGS Protocol (odgs>=5.1.0)"]
        I["Universal Interceptor\nHARD_STOP / SOFT_STOP / WARNING / LOG_ONLY"]
        WB["Write-Back\n→ Unity Catalog Comments"]
    end

    subgraph MP["Metric Provenance (Commercial)"]
        SC["S-Cert Registry\n(JWS Audit Seal)"]
    end

    CAT & TBL & CON --> T --> TR --> I
    I -->|"sovereign_audit.log"| WB --> UC
    I -->|"Certified S-Cert"| SC

What Gets Generated

Unity Catalog Input ODGS Output Type Rule Example
Table metadata metrics Metric definitions with full column schemas
Non-nullable columns rules (HARD_STOP) revenue.amount IS NOT NULL
Column data type rules (WARNING) type(amount) == 'decimal'

Install

pip install odgs-databricks-bridge

Quick Start

Python API

from odgs_databricks import DatabricksBridge

bridge = DatabricksBridge(
    workspace_url="https://adb-1234567890.azuredatabricks.net",
    token="dapi...",
    organization="acme_corp",
)

# Sync all tables from a catalog → ODGS metric definitions
bridge.sync(
    catalog="production",
    output_dir="./schemas/custom/",
    output_type="metrics",
)

# Sync column constraints → ODGS enforcement rules
bridge.sync(
    catalog="production",
    schema_filter="finance",
    output_dir="./schemas/custom/",
    output_type="rules",
    severity="HARD_STOP",
)

CLI

# Using standard Databricks SDK environment variables
export DATABRICKS_HOST=https://adb-1234567890.azuredatabricks.net
export DATABRICKS_TOKEN=dapi...

odgs-databricks sync \
    --org acme_corp \
    --catalog production \
    --schema finance \
    --type rules \
    --severity HARD_STOP \
    --output ./schemas/custom/

# Push compliance results back to Unity Catalog table comments
odgs-databricks write-back \
    --log-path ./sovereign_audit.log \
    --url https://adb-1234567890.azuredatabricks.net \
    --token dapi...

Output Schema

{
  "$schema": "https://metricprovenance.com/schemas/odgs/v5",
  "metadata": {
    "source": "databricks",
    "organization": "acme_corp",
    "tables_processed": 12,
    "items_generated": 47
  },
  "items": [
    {
      "rule_urn": "urn:odgs:custom:acme_corp:rule:revenue_amount_not_null",
      "name": "revenue.amount NOT NULL",
      "severity": "HARD_STOP",
      "constraint_type": "NOT_NULL",
      "target_table": "production.finance.revenue",
      "plain_english_description": "The revenue amount field must never be null in financial transaction records",
      "content_hash": "a1b2c3..."
    }
  ]
}

Bi-Directional Write-Backs

The bridge supports Bi-Directional Sync: it parses your sovereign_audit.log offline and pushes compliance results back into Unity Catalog table comments — creating a seamless feedback loop for Data Stewards without compromising the air-gapped nature of the core ODGS protocol.


Authentication

Method CLI Flag Environment Variable
Personal Access Token --token DATABRICKS_TOKEN
Workspace URL --url DATABRICKS_HOST

Regulatory Alignment

This bridge is designed for organisations governed by:

Regulation Relevance
DORA (Regulation EU 2022/2554) ICT resilience — data lineage and operational incident traceability across Databricks workloads
EU AI Act (2024/1689) Articles 10 & 12 Training data governance and audit trail requirements for High-Risk AI Systems built on Databricks
Basel Committee BCBS 239 Risk data aggregation — accuracy and integrity of data sourced from Unity Catalog
NEN 381 525 Dutch federated data sovereignty standard

For cryptographic legal indemnity (Ed25519 JWS audit seals, certified Sovereign Packs for DORA/EU AI Act), see the Metric Provenance Enterprise Platform.


Requirements

  • Python ≥ 3.9
  • odgs ≥ 5.1.0 (core protocol — v6.0 compatible)
  • Databricks workspace with Unity Catalog enabled

Related


License

Apache 2.0 — Metric Provenance | The Hague, NL 🇳🇱

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odgs_databricks_bridge-0.4.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odgs_databricks_bridge-0.4.0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file odgs_databricks_bridge-0.4.0.tar.gz.

File metadata

  • Download URL: odgs_databricks_bridge-0.4.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for odgs_databricks_bridge-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c36c5bedb882a908415276bfcd4531b9f5af2b710ef9df300b0ed8b69adac3ed
MD5 2e6202737a269d473443efab78f8b88b
BLAKE2b-256 b786c4a205b2bb41f0c9c4d20c8c5e13c7238016bec684f4eccc45e404d24000

See more details on using hashes here.

File details

Details for the file odgs_databricks_bridge-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for odgs_databricks_bridge-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb8e1aa6511ad1a3a266d7a0cc2bf981829285e214294dfe5bf834e54ccfde64
MD5 a99eb9f1d7d9930cfb05b6fe3ff0a178
BLAKE2b-256 8add132e0a74e7271c5fa70c77ff87d6fca9cca8c9d679e807aaf43f9fe635ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page