Skip to content

Ambiguous reference to column name #710

Answered by RobinL
dshopin asked this question in Q&A
Discussion options

You must be logged in to vote

Solution

There seems to be a problem with how the date_diff function is transpiled in sqlglot.

You can work around it using the following blocking rule:

on abs(cast(l.visit_date_time_utc as date) - cast(r.visit_date_time_utc as date)) <= 5 * 24

I'd be grateful if you'd let me know if this doesn't work

Other notes

I should also note that these kinds of 'within a range' blocking rules execute much less efficiently than anything with an equality condition.

To evaluate this blocking rules, Splink will have to generate ALL possible comparisons from the input records i.e. the cartesian product, and then evaluate this inequality condition. So if you have large input datasets, this will be extre…

Replies: 3 comments 4 replies

Comment options

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

Comment options

You must be logged in to vote
3 replies
@dshopin
Comment options

@dshopin
Comment options

@RobinL
Comment options

Answer selected by RobinL
Comment options

You must be logged in to vote
0 replies
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