Skip to main content

GoldenMatch entity resolution functions for DuckDB

Project description

goldenmatch-duckdb

GoldenMatch entity resolution functions for DuckDB.

pip install goldenmatch-duckdb

Usage

import duckdb
import goldenmatch_duckdb

con = duckdb.connect()
goldenmatch_duckdb.register(con)

# Score two strings
con.sql("SELECT goldenmatch_score('John Smith', 'Jon Smyth', 'jaro_winkler')").show()

# Deduplicate a table
con.sql("""
    CREATE TABLE customers AS SELECT * FROM (VALUES
        ('John', 'john@x.com'),
        ('JOHN', 'john@x.com'),
        ('Jane', 'jane@y.com')
    ) AS t(name, email)
""")
con.sql("SELECT goldenmatch_dedupe_table('customers', '{\"exact\": [\"email\"]}')").show()

# Match two tables
con.sql("SELECT goldenmatch_match_tables('prospects', 'reference', '{\"fuzzy\": {\"name\": 0.85}}')").show()

Functions

Function Description
goldenmatch_score(a, b, scorer) Score two strings
goldenmatch_score_pair(rec_a, rec_b, config) Score two JSON records
goldenmatch_explain(rec_a, rec_b, config) Explain a match
goldenmatch_dedupe_table(table, config) Deduplicate a DuckDB table
goldenmatch_match_tables(target, ref, config) Match two DuckDB tables
goldenmatch_dedupe(json, config) Deduplicate JSON records
goldenmatch_match(target_json, ref_json, config) Match JSON records

Requirements

  • Python 3.11+
  • DuckDB 1.0+
  • goldenmatch >= 1.1.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

goldenmatch_duckdb-0.2.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

goldenmatch_duckdb-0.2.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file goldenmatch_duckdb-0.2.0.tar.gz.

File metadata

  • Download URL: goldenmatch_duckdb-0.2.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for goldenmatch_duckdb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 76e1c73ec9c7d4aceea487f8603e81e3122fea4f2e977eb620bb00e8ea49fc07
MD5 79fcfe449a67ba420284b6ff64673b35
BLAKE2b-256 c28038372f70cee41dc5ac08820fb1ff8f8706dd8a48ee10b4a7d60e009aa15f

See more details on using hashes here.

File details

Details for the file goldenmatch_duckdb-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for goldenmatch_duckdb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88e32d27d2ea540248cc854b25cdf6d0d294876bbd49e90835951c5c26914992
MD5 4e61b807d9c9da6ba832f96a93b3f8e4
BLAKE2b-256 4dd9b73000220a39aaa1623f9f87a0cd510b0fb8d8738091284329a4f0ad2088

See more details on using hashes here.

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