Skip to main content

A framework for orchestrating and comparing data linking and deduplication methodologies.

Project description

🔥 Matchbox DB

Record matching is a chore. Matchbox is a match pipeline orchestration tool that aims to:

  • Make matching an iterative, collaborative, measurable problem
  • Compose sources, dedupers and linkers and make the results very easy to query
  • Allow organisations to know they have matching records without having to share the data
  • Allow matching pipelines to run iteratively
  • Support batch and real-time matching

Matchbox doesn't store raw data, instead indexing the data in your warehouse and leaving permissioning at the level of the user, service or pipeline.

Installation

To install the matchbox client:

pip install "matchbox-db"

To install the full package, including the server features:

pip install "matchbox-db[server]"

Running the server locally

To run the server locally, run:

docker compose up --build

Running the server locally with Datadog (monitoring) integration

  1. Run:

    cp ./environments/datadog-agent-private-sample.env ./environments/.datadog-agent-private.env
    
  2. Populate the newly-created ./environments/.datadog-agent-private.env with a Datadog API key.

  3. Run the server using:

    docker compose --profile monitoring up --build
    

Use cases

Data architects and engineers

  • Reconcile entities across disparate datasets
  • Rationalise about the quality of different entity matching pipelines and serve up the best
  • Run matching pipelines without recomputing them every time
  • Lay the foundation for the nouns of a semantic layer

Data analysts and scientists

  • Use your team's best matching methods when retrieving entities, always
  • Measurably improve methodologies when they don't work for you
  • When you link new datasets, allow others to use your work easily and securely

Service owners

  • Understand the broader business entities in your service, not just what you have
  • Enrich other services with data generated in yours without giving away any permissioning powers
  • Empower your users to label matched entities and let other services use that information

Structure

[!CAUTION] Some of the below is aspirational. Matchbox is in alpha and under heavy construction.

The project is loosely formed into a client/server structure.

Server

The parts of matchbox intended for deployment. Allows different backends as long as they can meet the standards of the adapter and tests.

Client

The parts of matchbox intended for users and services to call a matchbox server, and to insert matched data in the right structure.

If the dataset isn't already in matchbox, it'll need to be indexed.

API endpoints with write properties require API Key authentication. The API key should be stored in the client environment or .env as a variable named MB__CLIENT__API_KEY.

Pipelines using this part of matchbox will:

  1. Use matchbox.query() to retrieve source data from the perspective of a particular resolution point
  2. Use matchbox.process() to clean the data with standardised processes
  3. Use matchbox.make_model() with matchbox.dedupers and matchbox.linkers to create a new model
  4. Generate probabilistic model outputs using model.run()
  5. Upload the probabilites to matchbox with results.to_matchbox()
  6. Label data, or use existing data, to decide the probability threshold that you're willing to consider "truth" for your new model
  7. Use model.roc_curve() and other tools to make your decision
  8. Update model.truth to codify it

With the truth threshold set to 1.0 by default, deterministic methodologies are ready for others to use from step five!

Development

See our full development guide and coding standards in CONTRIBUTING.md

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

matchbox_db-0.2.4.tar.gz (99.2 kB view details)

Uploaded Source

Built Distribution

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

matchbox_db-0.2.4-py3-none-any.whl (121.4 kB view details)

Uploaded Python 3

File details

Details for the file matchbox_db-0.2.4.tar.gz.

File metadata

  • Download URL: matchbox_db-0.2.4.tar.gz
  • Upload date:
  • Size: 99.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for matchbox_db-0.2.4.tar.gz
Algorithm Hash digest
SHA256 5155e4f9c642e36b727fb81d8044ca4627a51f6231262d4b0538018e2f63e2b9
MD5 8d1b0ea169ec1bfca1a5f2ae41b4517d
BLAKE2b-256 7ec345d511b46ad77c3904848c738266bf63f2160757015a92579e5b50544cf9

See more details on using hashes here.

Provenance

The following attestation bundles were made for matchbox_db-0.2.4.tar.gz:

Publisher: deploy-package-to-pypi.yml on uktrade/matchbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file matchbox_db-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: matchbox_db-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 121.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for matchbox_db-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 44cb3cd85918c31d910bbb6b1818c140021118c6819bc6beb8151537ff15e759
MD5 10fe7b01a4cb1c7f11645062e46a1388
BLAKE2b-256 225b1333b78b59649c5f68d95fd9b0ad592ae86bf8b3122c333203a8ee6d51db

See more details on using hashes here.

Provenance

The following attestation bundles were made for matchbox_db-0.2.4-py3-none-any.whl:

Publisher: deploy-package-to-pypi.yml on uktrade/matchbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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