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
Since SDV 1.0 will use a slightly modified metadata format, it can be time-consuming to convert preexisting metadata files manually.
Expected behavior
Create utility methods that would convert metadata in the old format to valid metadata in the new format. Add a method called upgrade_metadata to each class that takes in the old metadata file and writes a new one.
fromsdv.metadataimportSingleTableMetadataSingleTableMetadata.upgrade_metadata(
old_filepath='old_metadata.json',
new_filepath='new_metadata.json'
)
# same method would exist for MultiTableMetadata
Cases
Filepaths: The file in old_filepath must be found and there must be no file already existing in new_filepath.
Metadata Validity. The user's old metadata may not be valid. After writing the new file, do the validate() check and if anything is found, throw a warning with the details.
Single & Sequential Metadata. Some users may have written a single table or sequential metadata file using the multi-table format. As in, they have nested the (single) table under the "tables" keyword. We should properly convert the metadata in this case.
Problem Description
Since SDV 1.0 will use a slightly modified metadata format, it can be time-consuming to convert preexisting metadata files manually.
Expected behavior
Create utility methods that would convert metadata in the old format to valid metadata in the new format. Add a method called
upgrade_metadata
to each class that takes in the old metadata file and writes a new one.Cases
Filepaths: The file in
old_filepath
must be found and there must be no file already existing innew_filepath
.Metadata Validity. The user's old metadata may not be valid. After writing the new file, do the
validate()
check and if anything is found, throw a warning with the details.Single & Sequential Metadata. Some users may have written a single table or sequential metadata file using the multi-table format. As in, they have nested the (single) table under the
"tables"
keyword. We should properly convert the metadata in this case.However, if there are multiple table specified, then throw an error.
Conversion Error: Do not write the file if there are any others errors in parsing or converting the old metadata. Let whatever error occurs be raised.
The text was updated successfully, but these errors were encountered: