Implement Blocking for performance and precision
masterBlocking is an advanced technique where multiple matches are performed in sequence. Each subsequent match only applies to the subset of results from the previous match. This makes matching faster and more precise for large datasets.
To implement blocking, you provide lists of arguments (fields, ignores, methods, and thresholds). If you provide fewer values than there are blocks, the last specified value is reused for all subsequent blocks. You can use --verbose to verify how your blocks are being parsed.
# Example: Block 1 (case-insensitive surname match) -> Block 2 (Levenshtein forename match)
$ csvmatch \
data1.csv \
data2.csv \
--fields1 name \
--fields2 'Person Name' \
--ignore case words-leading \
--ignore words-tailing \
--method literal levenshtein \
> matches.csv