Pluggable Data Classification Engine with Support for Custom Rules and Import from External Sources
OpenMetadata currently supports automatic classification of sensitive data through Auto PII Tagging, based on built-in regex patterns and entity recognition. While this works for common English-language PII types, it lacks flexibility for organizations that need to classify domain-specific or localized data using their own business logic.
This feature request proposes the implementation of a pluggable data classification engine that supports multiple types of custom inference rules (e.g., regex, scripts, external APIs) and the ability to import existing rule definitions from legacy tools to accelerate adoption and migration.
Feature Scope
1. Custom Data Classification Rules
Enable users to define their own data classes (e.g., CPF, CNPJ, LicensePlate, AddressFragment) and associate each with:
- Regex pattern(s)
- Inline code (e.g., Python, Java, JavaScript)
- REST API call (webhook-based validation)
Rules should be evaluated during data profiling or metadata ingestion to suggest or apply classifications automatically.
2. Rule Evaluation Strategy
- All enabled rules should be evaluated per column
- A rule match can result in:
- Assignment of a tag/classification
- Confidence score
- Optional glossary linkage
- Support priority, fallback, and conflict resolution mechanisms when multiple rules match
3. Rule Management UI/API
- Web UI for rule creation, management, and versioning
- Ability to group rules into "Rule Packs" or reusable libraries
- Rule templates for standard formats (e.g., email, national ID, phone, ZIP code)
4. Import Rules from External Tools
- Support importing rules from external tools or legacy platforms (via YAML/JSON/CSV or API connector)
- Examples of imported assets:
- Regex library from a legacy catalog
- Script-based validators
- Glossary-term-to-classification mappings
This import functionality would significantly accelerate onboarding for organizations migrating from enterprise solutions.
5. Integration with Governance
- Automatically apply tags and trigger policies (e.g., masking, access control)
- Allow tags to influence data visibility, documentation workflow, and impact analysis
6. Auditable Results and Feedback
- Track all rule evaluations and classification suggestions per column
- Allow users to confirm, override, or provide feedback on inferred classifications
- Store logs of rule execution for auditability
Benefits
- Enables accurate classification of data using local business logic and formats
- Reduces manual tagging effort through semantically-aware automation
- Facilitates governance, data quality monitoring, and access control
- Significantly eases migration from legacy platforms by importing existing rule libraries
- Makes OpenMetadata more accessible to non-English, regulated, or industry-specific environments
Happy to discuss implementation ideas or collaborate on early design specs. This feature could be introduced incrementally, starting with regex-based classification and growing into script and import support.
Hi! I'd like to contribute to this issue as part of the WeMakeDevs × OpenMetadata OUTATIME Hackathon.
This issue describes exactly what I've been building. Here's my current implementation:
Custom Localized PII Recognizers (India-first):
- Aadhaar (12-digit UID), PAN card (ABCDE1234F), IFSC codes, UPI IDs
- DPDP 2023 (India's Digital Personal Data Protection Act) classification rules
- Extends beyond built-in English PII patterns — addresses the exact gap described here
Pluggable Classification Engine:
- ONNX Runtime model (all-MiniLM-L6-v2, 384-dim embeddings) for semantic rule evaluation
- FAISS vector index over 2,416 governance-labeled examples — each acts as a "custom rule"
- Confidence scoring per column with conflict resolution (BLOCK / SUPPORT / ALLOW decisions)
- Rules are externally loadable via JSON label files — no code changes needed to add new patterns
Governance Integration:
- Writes classification tags back to OpenMetadata via REST API (/api/v1/tables/{id})
- Triggers policy enforcement, access controls, and masking recommendations
- Compliance report generation: DPDP / GDPR / HIPAA / PCI DSS
Auditability:
- Every classification decision is logged to MongoDB with query, rule matched, confidence score, and timestamp
- Full audit trail queryable via API
I'd love to contribute this upstream — either as a reference implementation or by helping define the pluggable interface spec. Could a maintainer assign this to me alongside the existing assignee?
Hi. Apologies for the late response, I've been focused on rolling out a more flexible approach to classification (out since 1.12.0), though the UI is not part of the OSS.
I think you could let me prepare a document explaining the architecture of the new approach so your suggestions could take into account what's been built.
Thank you for the context! I'd love to read the architecture document — that would really help me align my implementation with your direction.
A bit of context on my end: I built this as part of the WeMakeDevs × OpenMetadata OUTATIME Hackathon (deadline Apr 26), so I'm working against a short timeline. My current implementation runs on top of OpenMetadata 1.4.7 via the REST API (no core changes), so it should be complementary rather than conflicting with what's in the codebase.
What I've built:
- 3-layer PII detection: column-name patterns + regex + FAISS semantic engine
- India-specific recognizers: Aadhaar, PAN, IFSC, UPI (DPDP 2023 compliant)
- Auto-writes governance tags back to OM via the classification API
- Board-level compliance reports (DPDP/GDPR/HIPAA/PCI DSS)
Happy to wait for your document, or if a hackathon-context assignment is possible in the meantime, that would mean a lot. Either way, I'm very interested in contributing this to the project long-term.