Skip to content

Commit cf53d03

Browse files
author
Dat Nguyen
committed
fix: match_percentage
1 parent 88c3d84 commit cf53d03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

macros/resources/stored-procedures/create__check_data_diff.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@
184184
,trg_table
185185
,column_name
186186
,cnt as diff_count
187-
,(select count(*) from '|| src_db || '.' || src_schema || '.' || src_table || ') as total_count
187+
,(select count(*) from '|| src_db || '.' || src_schema || '.' || src_table || ' where ' || where_condition || ')) as total_count
188188
,(1 - match_rate) as diff_feeded_rate
189-
,(1 - diff_count / total_count) as match_percentage
189+
,(1 - diff_count / 2 * 1.0 / total_count) as match_percentage
190190
,''' || ? ||''' as last_data_diff_timestamp
191191
,''' || ? ||''' as diff_run_id
192192
from calc

0 commit comments

Comments
 (0)