A private, local LLM-powered data dictionary parser and entity mapper with automated cleaning.
Project description
dd-parser-cleaner
One-line summary
dd-parser-cleaner inspects incoming datasets, emits validated manifests describing structure and modalities, runs deterministic integrity checks, and writes a handshake file that downstream featurizers must read before transforming data.
Purpose
This package provides discovery and validation for enterprise datasets. It detects dataset type (cross-sectional, event-log, panel, homogeneous/bipartite/heterogeneous graph), tags attributes with roles and modalities, validates keys and joins, and produces actionable diagnostics and remediation hints. The canonical outputs are dataset manifest, attribute manifest, and handshake.json.
Quick start (workflow)
- Discover package capabilities
from dd_parser_cleaner import get_package_info
info = get_package_info()
- Run the parser (CLI or API) to produce:
manifests/<dataset_id>.json(dataset manifest)attributes/<dataset_id>_attributes.json(attribute manifest)
- Run the cleaner to validate manifests and produce:
manifests/handshake.json
- Featurizer must read
manifests/handshake.jsonand proceed only ifstatus == "ready".
Key capabilities
- Dataset discovery: auto-detects
dataset_typeand primary/time keys. - Attribute tagging: emits
role,time_dependency,granularity,modality,suggested_checks,generated_key_flag. - Graph support: homogeneous, bipartite, heterogeneous graphs with entity/relationship maps.
- Longitudinal support: event-log vs panel; static vs dynamic attributes.
- Manifest emission: canonical JSON manifests for downstream deterministic featurization.
- Cleaner validations: monotonicity, lag consistency, cycle detection, relation consistency, URL/geo sanity checks.
- Handshake contract:
handshake.jsonwithstatus(ready|blocked|warnings). - Config driven: behavior controlled by
config.yamlflags.
Example artifacts
Example dataset manifest (snippet)
{
"dataset_id": "orders_2026",
"dataset_type": "event_log",
"primary_key_spec": ["order_id"],
"time_key_spec": "event_time",
"entity_files": [],
"relation_files": [],
"panel_variable_map": null,
"notes": "Order events from e-commerce pipeline",
"validation_errors": []
}
Example attribute manifest entry
{
"attribute_name": "order_id",
"role": "subject_key",
"time_dependency": "none",
"granularity": null,
"modality": "categorical",
"suggested_checks": ["null_profile"],
"generated_key_flag": false
}
Example handshake.json
{
"status": "ready",
"manifest_path": "manifests/orders_2026.json",
"blocking_reasons": []
}
Where to find schemas and examples
- JSON Schema files (manifest validation):
schemas/dataset_manifest.json,schemas/attribute_manifest.json,schemas/handshake.json - Workspace questionnaire config:
documents/config/dataset_questions.json - Sample manifests and fixtures:
tests/fixtures/manifests/andtests/fixtures/csvs/ - Docs and design:
USER_GUIDE.md,documents/, anddocs/manifest.md
Important config flags (defaults)
Add or review these in config.yaml under a manifest section:
manifest:
require_manifest_before_featurize: true
use_case_questions_enabled: false
graph_entity_limit: 5
generate_surrogate_keys: true
url_sample_size: 10
Handshake contract (featurizer requirements)
- Featurizer must read
manifests/handshake.jsonbefore any transformation. - If
status == "blocked", the featurizer must refuse to proceed. - If
status == "warnings", the featurizer may proceed only after acknowledging and recording the warnings.
Migration and compatibility
- New manifest fields are additive and optional. Existing cross-sectional outputs remain unchanged during phased rollout.
- Recommended phased rollout:
- Emit manifests and handshake while preserving legacy outputs.
- Enable cleaner validators and handshake enforcement behind config flags.
- Deprecate legacy outputs after one release cycle.
Troubleshooting (common validation failures)
- Missing primary key: parser will generate a surrogate key and set
generated_key_flag; prefer providing explicit keys. - Time key absent for longitudinal data: set
time_key_specor mark dataset ascross_sectional. - Relation file join mismatch: ensure
entity_key_specmatches keys referenced in relation files. - Heterogeneous graph cycle detected: convert to acyclic tree or correct relationship files.
- Invalid URLs or geo addresses: check
modalitytags and sample rows flagged in diagnostics.
Each validation error includes severity, remediation, and sample_rows in the cleaner report.
How clients and agents should use get_package_info()
Use get_package_info() to discover:
- CLI commands and entry points
manifest_schema_pathsfor validationhandshake_specand allowedstatusvaluessupported_dataset_typesand importantconfig_flags
Treat get_package_info() as the canonical programmatic discovery endpoint.
Support and contribution
- Issue tracker: add issues at the repository issue tracker (link in
get_package_info()output). - Contributing: follow repository CONTRIBUTING.md for tests, fixtures, and schema updates.
- Contact: open an issue for integration questions or schema clarifications.
One-line blurb for top-level README
dd-parser-cleaner inspects datasets, emits validated manifests and a handshake file describing keys, time semantics, modalities, and graph structure, and provides deterministic diagnostics so downstream featurizers can safely and reproducibly transform data.
Existing quick links
USER_GUIDE.mdfor usage detailsdocuments/for methodology and internal design notestests/notebooks/for example notebook workflows
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 dd_parser_cleaner-1.0.0.tar.gz.
File metadata
- Download URL: dd_parser_cleaner-1.0.0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ccb72885a30986e017bb34dddda1e0fa8042044f9d7cb2983ef8dfa9235d73c
|
|
| MD5 |
d2d5284e806bd89babdeee6be256f068
|
|
| BLAKE2b-256 |
7bde9df4d03f2305c9032c672794890a9332b5fb58fa72ddef4972789b5c6564
|
File details
Details for the file dd_parser_cleaner-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dd_parser_cleaner-1.0.0-py3-none-any.whl
- Upload date:
- Size: 68.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46fcb355ee4a36611ab6c863b847b5eb159e499c1cacb16d7207d5a37071f43e
|
|
| MD5 |
686f8cf76cd3a093656c8610480995e3
|
|
| BLAKE2b-256 |
27d8e03a1910b934881b37e6c58f4281cfc3c94e1beb45ddc0a3057e729cd2b3
|