Multi table quality report should handle multi-foreign keys (to same parent) #406
Labels
data:multi-table
Related to multi-table, relational datasets
feature:reports
Related to any of the generated reports
feature request
Request for a new feature
Milestone
Problem Description
Currently the Cardinality property in the multi-table quality report assumes that there is only 1 connection between every parent and child table. This is not always true.
It's possible that a child table has multiple foreign keys that point to the same primary key column in the parent. For example: I can have a parent table
banks
and a child tabletransactions
. Then for bank-to-bank transactions, there should be 2 foreign keys intransactions
that point point tobanks
(they represent the payor and payee).Expected behavior
The Quality Report should be updated to account for this case.
In
get_details
, we expect to show a DataFrame for each breakdown. This table should include aForeign Key
column to distinguish relationships that have the same parent and child tables. (Note that we can still usetable_name
to select the portions of the dataframe that match either the parent or child table.)In
get_visualization
, each bar is currently labeled with child and parent. We should also update it with the name of the foreign key. Eg.transactions (payor) -> banks
The text was updated successfully, but these errors were encountered: