@@ -251,13 +251,14 @@ def _run_location_matching(table, destination_table, bq_client, algorithm):
251
251
returns float64
252
252
language js as \" \" \"
253
253
var rawScore = 50*(1-chain_match) + 50*(1-addr_match);
254
- var score =
255
- (chain_match == 0 || addr_match == 0) ? 100 :
256
- chain_match > 1 && addr_match >= .5 ? Math.min(5, rawScore) :
257
- chain_match >= .8 && addr_match >= .5 ? Math.min(15, rawScore) :
258
- addr_match >= .8 && chain_match >= .5 ? Math.min(15, rawScore) :
259
- chain_match >= .3 && addr_match >= .9 ? Math.min(20, rawScore) :
260
- rawScore;
254
+ var score =
255
+ (chain_match == 0) ? 100 :
256
+ chain_match > 1 && addr_match >= .5 ? Math.min(5, rawScore) :
257
+ chain_match >= .8 && addr_match >= .5 ? Math.min(15, rawScore) :
258
+ addr_match >= .8 && chain_match >= .5 ? Math.min(15, rawScore) :
259
+ chain_match >= .3 && addr_match >= .9 ? Math.min(20, rawScore) :
260
+ chain_match > 1 ? Math.min(20, rawScore) :
261
+ rawScore;
261
262
return score;
262
263
\" \" \"
263
264
OPTIONS (
@@ -770,6 +771,7 @@ def process_location_matching(data, context):
770
771
771
772
772
773
# process_location_matching({'name': '[email protected] /simple_list___no_mv_gcs.txt'}, None)
773
- process_location_matching ({
'name' :
'[email protected] /Matching_list_nozip___no_mv_gcs.txt' },
None )
774
+ # process_location_matching({'name': '[email protected] /Matching_list_nozip___no_mv_gcs.txt'}, None)
775
+ process_location_matching ({
'name' :
'[email protected] /walmart_list_with_match_issue_6___no_mv_gcs.txt' },
None )
774
776
# process_location_matching({'name': '[email protected] /walmart_list_with_match_issue___no_mv_gcs.txt'}, None)
775
777
# _send_mail('[email protected] ', ['[email protected] '], 'My test', 'The body')
0 commit comments