Foreign Key Check¶
Check: foreign-key-check
Purpose: Validates that all values in a column exist in a reference dataset's column. The check fails if any value in the source column cannot be resolved in the referenced column. This is an aggregate-level check that reports the count and ratio of unresolvable references.
Typical Use Cases¶
- Ensure every
order.customer_idresolves to an existing entry in thecustomerstable. - Validate foreign key references in fact tables against known dimension entries.
- Enforce referential integrity between datasets in data lakes or data warehouses.