Reputation: 157
I managed to schedule a big query query that tests for equality between two tables (one at the granularity of a linen sheet level, while other is a daily roll up of linen sheet counts).
However, i fail to include the actual value of the variance as the ERROR() argument only expects strings; is there a way to say ERROR('Absolute Variance is {value x} - {value y} = {z} sheets') ?
CASE WHEN
ABS( (sheet_counts.pass - daily_scan.approved_pieces )) >= 1 THEN
ERROR('Absolute Variance between sheet level and day level counts is greater than 0 for yesterday, Dori - please investigate data flow job to ensure no job failed, Thank you !')
ELSE 'pass' END AS sheet_daily_match,
Upvotes: 0
Views: 52