-
-
Notifications
You must be signed in to change notification settings - Fork 13
InferMap
Schema mapping engine. Auto-aligns columns from heterogeneous source schemas to a canonical target schema using a weighted scorer pipeline + optimal 1:1 assignment via the Hungarian algorithm.
Source: packages/python/infermap · PyPI: infermap · npm: infermap
pip install infermap
infermap map --source partner_export.csv --schema canonical.yamlInferMap solves the column-alignment half of integration: when partner A calls a column fname and your canonical schema says first_name, InferMap figures out the mapping (with calibrated confidence scores). Below a confidence threshold the mapping is rejected — never a silent guess.
| Component | Purpose |
|---|---|
ExactScorer |
Exact name match |
AliasScorer |
Curated alias dictionary (fname ↔ first_name, etc.) — extensible via config |
PatternTypeScorer |
Regex-classified semantic types (email, phone, date, ZIP, …) |
ProfileScorer |
Statistical profile similarity (cardinality, dtype, null rate, range) |
FuzzyNameScorer |
Jaro-Winkler / Levenshtein on column names |
| Score combiner | Weighted average; None = abstain, 0.0 = real negative; min 2 contributors |
| Assignment |
scipy.optimize.linear_sum_assignment — Hungarian, optimal 1:1 |
import infermap
import polars as pl
source = pl.read_csv("partner_export.csv", encoding="utf8-lossy")
result = infermap.map(
source=source.head(500).to_dicts(),
schema_file="canonical.yaml",
)
for m in result.mappings:
print(f"{m.source} → {m.target} conf={m.confidence:.2f} reasons={m.reasoning}")
# Apply: rename source columns to canonical
mapping = {m.source: m.target for m in result.mappings if m.confidence >= 0.7}
canonical = source.select(list(mapping.keys())).rename(mapping)infermap.from_config() lets you tune scorer weights and extend the alias dictionary via YAML.
InferMap sits at the front of the suite for any pipeline that ingests heterogeneous sources. Use cases:
-
Source onboarding (
golden_suite_schema_align_and_load): align a new partner's columns once, cache the mapping, reuse forever. -
Schema drift alerting (
golden_suite_schema_drift_alarm): re-run InferMap on each source's latest sample and alert when columns drift from the cached mapping. Never auto-update. -
Customer 360 (
golden_suite_customer_360): align CRM + warehouse + support to one canonical schema before unioning and deduping.
infermap map -s source.csv -t target.csv # source-to-source
infermap map -s source.csv --schema canon.yaml # against a canonical schema
infermap apply -s source.csv -m mapping.json # apply a saved mapping
infermap inspect mapping.json # explain the mapping reasoning
infermap validate -s source.csv --schema canon.yaml --min-confidence 0.7
infermap mcp-serve --transport http --port 8400ghcr.io/benzsevern/infermap-mcp:latest. Tools: map, apply, inspect, validate, plus resource endpoints listing supported domains and the alias dictionary. Surfaced under the goldensuite-mcp aggregator.
Full feature parity, 182 tests, Hungarian assignment, parity harness vs the Python implementation locked at 4-decimal tolerance.
⚡ GoldenMatch — Entity resolution toolkit | PyPI | GitHub | Open in Colab | MIT License
🟡 Golden Suite (Monorepo)
Suite Packages
- GoldenCheck · data quality
- GoldenFlow · transforms
- GoldenPipe · orchestrator
- InferMap · schema mapping
Getting Started
- Installation
- Quick Start
- Auto-Config Controller · enhanced through v1.12
- Configuration
- Verification · new in v1.5
- CLI Reference
Core Concepts
AI Integration
Advanced
- PPRL
- Domain Packs
- Streaming / CDC
- Database Integration
- GPU & Vertex AI
- REST API
- Interactive TUI
- Web UI · new in v1.7
- Evaluation
Reference
pip install goldenmatch
npm install goldenmatch