Sampled data with foreign key that points to more than one primary key results in InvalidDataError
#2372
Labels
bug
Something isn't working
InvalidDataError
#2372
Environment Details
Please indicate the following details about the environment in which you found the bug:
Error Description
Given metadata where a foreign key in a child table points to two primary keys in distinct tables, the resulting sampled data fails metadata validation. This should be considered invalid metadata (a foreign key should not be able to point to two separate primary keys), but I can successfully fit and and sample. However, when validating the sampled data with the metadata, I get an
InvalidDataError
because the sampled child contains entirely unknown references to one of the parents.Suggested fix
To prevent this issue, we should update metadata validation to disallow multiple relationships between a single foreign key and multiple primary keys.
Steps to reproduce
The text was updated successfully, but these errors were encountered: