Skip to content

ParserException: Parser Error: syntax error at or near "=" #2441

Answered by ADBond
sayedMbo asked this question in Q&A
Discussion options

You must be logged in to vote

Your problem is this blocking rule:

block_on("levenshtein(l.manufacturer, r.manufacturer) <= 2")

The function block_on accepts a column (or column expression such as substr(name, 1, 5)), and will generate the blocking rule from that (so e.g. block_on("price") will get converted to the expression l.price = r.price). It will not accept a full condition such as you pass - you can see in the error message that this gets converted to the (ill-formed) blocking rule LEVENSHTEIN(l.manufacturer, l.manufacturer) <= 2 = LEVENSHTEIN(r.manufacturer, r.manufacturer) <= 2.

To pass in a custom rule such as yours you can just pass it in as a string:

...
blocking_rules_to_generate_predictions=[
    "levens…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sayedMbo
Comment options

Answer selected by sayedMbo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants