Document the grain decision, most BI bugs turn out to be grain bugs.
A NOT IN (SELECT customer_id FROM churned) filter returned zero rows even though churned customers clearly existed. Turned out the subquery could return a NULL.
Is NOT EXISTS just always the safer default here, or is there still a case for NOT IN?
Document the grain decision, most BI bugs turn out to be grain bugs.
Worth measuring the serialized size before choosing broadcast.
NOT EXISTS, or NOT IN with an explicit WHERE customer_id IS NOT NULL in the subquery, avoids this whole class of bug. Default to NOT EXISTS.
Prefer a staging table plus validation gate before promoting to prod tables.
Event-driven beats cron once landing time gets unpredictable.
Sign in to reply.
© 2026 Lakebench, operated by Hunnurji Rao. Bengaluru, Karnataka, India.
No cluster. No install. Just the tab.