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.6.tar.gz (650.6 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.6-py3-none-any.whl (131.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: matchbox_db-0.2.6.tar.gz
  • Upload date:
  • Size: 650.6 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.6.tar.gz
Algorithm Hash digest
SHA256 64c1268958fc9869a30a89fc977324115066deb7b1d1e8102e06f2e96302f6e3
MD5 99e45978d3e3f858bc8c080efcae25c1
BLAKE2b-256 614c97ebf833d3cbfcd028eb9076b861aca843d64be35b6f60f01d67188b2723

See more details on using hashes here.

Provenance

The following attestation bundles were made for matchbox_db-0.2.6.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.6-py3-none-any.whl.

File metadata

  • Download URL: matchbox_db-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 131.3 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d8b6f954f3fb6f552289e30a5ea97c337941c8fa5f27e951201a5a22288c6df2
MD5 0f3b8f4627915a542b7e2cc92f60efce
BLAKE2b-256 37c4b3da65d63fc4b47fa598463c49ca2772f0aa127765eb14c3b872e9f6fd0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for matchbox_db-0.2.6-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