Benefits of Using a Metadata Schema
Using a metadata schema provides several benefits:- Validation: Ensures that all custom metadata conforms to predefined data types, reducing errors during data registration and processing.
- Consistency: Maintains uniformity in data types across different datasets and projects, which simplifies data management and analysis.
- Filtering and Sorting: Enhances the ability to filter and sort data efficiently in the Encord platform, enabling more accurate and quick data retrieval.
Metadata Schema Table
Use .add_scalar() to add a scalar key to your metadata schema.
Use
add_enum and add_enum_options to add an enum and enum options to your metadata schema.
Use
add_embedding to add an embedding to your metadata schema.
Use
add_geospatial to add a new geospatial type to the metadata schema.
- Geospatial custom metadata is supported only in Curate.
- Geospatial custom metadata can be applied to all data unit types and on individual frames in videos.
Deprecated
Deprecated
While still supported, we STRONGLY RECOMMEND that you use the latest metadata schema instructions.
Import Your Metadata Schema to Encord
Deprecated
Deprecated
This is supported, as is, we STRONGLY RECOMMEND that you use the most current method of creating your custom metadata schema.
Verify Your Schema
After importing your schema to Encord we recommend that you verify that the import is successful. Run the following code to verify your metadata schema imported and that the schema is correct. Deprecated
Deprecated
This is supported, as is, we STRONGLY RECOMMEND that you use the most current method of creating your custom metadata schema.
Inspect Schema Keys
Use the following methods to check individual keys in your schema:keys() lists all keys, has_key() checks whether a key is defined, is_key_deleted() checks whether a key has been deleted, get_key_type() returns a key’s data type (or None for a deleted key), and get_enum_options() and get_embedding_size() return the values of an enum key and the size of an embedding key.
Inspect schema keys
Edit Schema Keys
You can change the data type of schema keys using the.set_scalar() method. The example below shows how to update the data type for multiple metadata fields.
Restore Schema Key
Delete Schema Keys
You can delete schema keys using the .delete() method. There are two types of deletion: hard delete and soft delete. A hard delete permanently removes the key, making it impossible to restore. A soft delete allows you to restore the key later using the .restore_key() method. The following examples show hard delete and soft deletion of a schema key calledFruit.
Restore Schema Keys
Keys that have been soft deleted can be restored using the .restore_key() method. The following example restores a schema key calledFruit.
Restore Schema Key

