You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"parent_table_name" and "child_table_name" should refer to tables that are defined in the "tables" portion of the metadata Error: Relationship contains an unknown table 'userss'.
"parent_primary_key" value should be the same as "primary_key" in the table definition Error: Relationship between tables ('users', 'transactions') contains an unknown primary key 'userr_id'.
"child_foreign_key" should refer to column(s) that are defined in the "tables" portion of the metadata Error: Relationship between tables ('users', 'transactions') contains an unknown foreign key 'transactions_idd'.
The length of "child_foreign_key" should match the length of "parent_primary_key" (you cannot have a single column foreign key referencing a multi-column composite primary key) Error: Relationship between tables ('users', 'transactions') is invalid. Primary key has length 2 but the foreign key has length 1.
The sdtype & attributes of the primary key should exactly match the sdtype & attributes of the foreign key Error: Relationship between tables ('users', 'transactions') is invalid. The primary and foreign key columns are not the same type.
If it's a composite key then match by the order in the list; eg. check that the 0-index has the same definitions, then the 1-index
The relationships should be acyclic (eg. you cannot have a cycle of dependencies A → B → C → A) Error: The relationships in the dataset describe a circular dependency between tables ('users', 'sessions', 'transactions').
All tables in the metadata must be connected. Only need to throw a max of 1 error of this type. Error: The relationships in the dataset are disjointed. Tables ('users') are not connected to any of the other tables.
The text was updated successfully, but these errors were encountered:
Problem Description
As a user, it would be useful to make sure the multi-table metadata I've specified is formatted correctly.
Expected behavior
validate
methodSingleTableMetadata.validate
method for each table and group the error messages.InvalidMetadataError
with all of the errors grouped by tableAdditional context
Relationship validation
"parent_table_name" and "child_table_name" should refer to tables that are defined in the "tables" portion of the metadata
Error: Relationship contains an unknown table 'userss'.
"parent_primary_key" value should be the same as "primary_key" in the table definition
Error: Relationship between tables ('users', 'transactions') contains an unknown primary key 'userr_id'.
"child_foreign_key" should refer to column(s) that are defined in the "tables" portion of the metadata
Error: Relationship between tables ('users', 'transactions') contains an unknown foreign key 'transactions_idd'.
The length of "child_foreign_key" should match the length of "parent_primary_key" (you cannot have a single column foreign key referencing a multi-column composite primary key)
Error: Relationship between tables ('users', 'transactions') is invalid. Primary key has length 2 but the foreign key has length 1.
The sdtype & attributes of the primary key should exactly match the sdtype & attributes of the foreign key
Error: Relationship between tables ('users', 'transactions') is invalid. The primary and foreign key columns are not the same type.
The relationships should be acyclic (eg. you cannot have a cycle of dependencies A → B → C → A)
Error: The relationships in the dataset describe a circular dependency between tables ('users', 'sessions', 'transactions').
All tables in the metadata must be connected. Only need to throw a max of 1 error of this type.
Error: The relationships in the dataset are disjointed. Tables ('users') are not connected to any of the other tables.
The text was updated successfully, but these errors were encountered: