Data Governance Kit provides programmatic access to data governance metadata with integrations for different Logical and Physical Modeling tools.
Project description
Data Governance Kit (dg_kit)
dg_kit provides programmatic access to governance metadata across logical models,
physical models, and data catalogs. It is designed for CI checks, governance
automation, and metadata synchronization workflows.
What it supports
- Parse physical metadata from dbt projects.
- Parse logical and business metadata from Oracle Data Modeler exports.
- Validate model consistency with YAML-driven convention rules.
- Synchronize a data catalog with a Notion data source.
Requirements
- Python
>=3.10
Installation
Install the package in editable mode:
pip install -e .
Optional extras:
pip install -e ".[dbt]"
pip install -e ".[notion]"
If you use uv:
uv sync --group dev
CLI usage
The package exposes a CLI entrypoint:
dg_kit <command> --config ./dg_kit.yml
Supported commands:
testvalidates LM/PM consistency and convention rules.syncsyncs the local model to the remote data catalog.pullpulls the remote data catalog into a local checkpoint.
Environment variables (for sync and pull)
These commands require:
export NOTION_TOKEN=...
export DATA_CATALOG_ID=...
On PowerShell:
$env:NOTION_TOKEN="..."
$env:DATA_CATALOG_ID="..."
Example commands
dg_kit test --config ./dg_kit.yml --convention ./dg_kit.convention.yml
dg_kit sync --config ./dg_kit.yml
dg_kit pull --config ./dg_kit.yml
Configuration examples
dg_kit.yml:
name: sample_project
version: v1
logical_model:
path: ./metadata/odm_versions
physical_model:
path: ./warehouse/dbt_project
data_catalog:
dc_checkpoint_path: ./.artifacts
row_property_mapping:
id: ID
title: Name
type: Type
domain: Domain
section_name_mapping:
description: Description
pk_attributes_references: PK attributes
attributes_references: Attributes
relations_references: Relations
linked_documents: Linked documents
responsible_parties: Responsible parties
pm_mapping_references: Physical mapping
source_systems: Source systems
parent_entity_reference: Parent entity
data_type: Data type
sensitivity_type: Sensitivity type
source_entity_reference: Source entity
target_entity_reference: Target entity
dg_kit.convention.yml:
lm_mapping_layers:
- core
rules:
lm_x_pm_consistency:
severity: error
description: Logical and physical mappings must stay consistent.
allowed_dependencies:
severity: warning
description: Restrict cross-layer dependencies.
rules:
core: [stage, core]
regex_by_layer:
severity: warning
description: Enforce table naming conventions.
rules:
core_tables:
layer: core
regex:
string: "^core_[a-z0-9_]+$"
technical_fields:
core:
- created_at
- updated_at
Python API quick examples
Build physical model from dbt:
from pathlib import Path
from dg_kit.integrations.dbt.parser import DBTParser
pm = DBTParser(Path("path/to/dbt_project"), version="v1").parse_pm()
print(pm.version, len(pm.tables))
Parse one ODM version from a versioned project directory:
from pathlib import Path
from dg_kit.integrations.odm.parser import ODMVersionedProjectParser
parser = ODMVersionedProjectParser(Path("path/to/odm_versions"))
parser.parse_version("v1", pm)
lm = parser.get_model("v1")
print(lm.version, len(lm.entities))
Development
Run local quality checks:
./scripts/ci.sh
Run tests:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dg_kit-0.1.9.tar.gz.
File metadata
- Download URL: dg_kit-0.1.9.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
354c2070bbfbc8f72586b5e529a45e520f4a99b21411bfd1c18de21bd3412511
|
|
| MD5 |
f14754bde57c3514f84c4585c470d31d
|
|
| BLAKE2b-256 |
8d22b477fcc0f4fc82c32fbf031d4f28f9e3da52aad804e824b2b1b2f8449737
|
File details
Details for the file dg_kit-0.1.9-py3-none-any.whl.
File metadata
- Download URL: dg_kit-0.1.9-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
893c40f954630002da3ff36fa1964b1d250c81dd6c100f2217eb2403fb3aa389
|
|
| MD5 |
a9ab3a35f35169a2a6d561d2c43b3a94
|
|
| BLAKE2b-256 |
e1a56e8e9e71c83141e52b8d02cb92dde1906a9f39608e4ae97772f7f567d81e
|