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
Currently, composite keys are not supported by any of the synthesizers in the SDV. Yet, some parts of the metadata functionality seem to imply that it is allowed. Until we add support for composite keys (see #613), the metadata should only allow for single-column primary keys.
Example 1: Python Dict
The following metadata has composite keys but it seems to pass the validation check.
Expectation: I expect that this should not pass validation. It should produce an error:
InvalidMetadataError: The metadata is not valid
Table: parent
'primary_key' must be a string.
Example 2: JSON
In JSON, it is not possible to encode a tuple so many users may try to encode a composite key as a list. This creates a confusing error that seems to imply that using tuples would work. metadata_example.json
InvalidMetadataError: The metadata is not valid
Table: parent
'primary_key' must be a string or tuple of strings.
Expectation: The error message should not imply that a tuple of strings is even a possibility. Because tuples are not allowed in JSON and also we do not support composite keys. The error message should only indicate that it can be a string.
InvalidMetadataError: The metadata is not valid
Table: parent
'primary_key' must be a string.
The text was updated successfully, but these errors were encountered:
Environment Details
Problem
Currently, composite keys are not supported by any of the synthesizers in the SDV. Yet, some parts of the metadata functionality seem to imply that it is allowed. Until we add support for composite keys (see #613), the metadata should only allow for single-column primary keys.
Example 1: Python Dict
The following metadata has composite keys but it seems to pass the validation check.
Expectation: I expect that this should not pass validation. It should produce an error:
Example 2: JSON
In JSON, it is not possible to encode a tuple so many users may try to encode a composite key as a list. This creates a confusing error that seems to imply that using tuples would work.
metadata_example.json
Expectation: The error message should not imply that a tuple of strings is even a possibility. Because tuples are not allowed in JSON and also we do not support composite keys. The error message should only indicate that it can be a string.
The text was updated successfully, but these errors were encountered: