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.1.0.tar.gz (3.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.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: goldenmatch_duckdb-0.1.0.tar.gz
  • Upload date:
  • Size: 3.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.1.0.tar.gz
Algorithm Hash digest
SHA256 929dba4e5fa9a4975aeded1941ac9b7d9bb561b087f1e9ce7b66852a6a3d55a3
MD5 9f471816e0e3fde7597de66d1065fb4c
BLAKE2b-256 deda39dad148cd97cb4e068640e57aaa49ebedeb321bde2b4f7fa1107142bb69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for goldenmatch_duckdb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0cf2e0a555569426b45abf6faf3c75c50e2ad61552656ff62965500576a8938
MD5 2d7f7796e50c93c832c28c44f8a92b9f
BLAKE2b-256 3878d87bb6ddecc292baf81db12b1f3be0702ad24a6cd41fe584ad5f304473c6

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