{"id":24136,"library":"odd-models","title":"ODD Models","description":"Open Data Discovery Models provides the data model schemas for Open Data Discovery (ODD) platform. Version 2.0.51 supports Python 3.9+ and defines entities like datasets, jobs, and metadata. The library is actively maintained with a focus on ODD protocol compatibility.","status":"active","version":"2.0.51","language":"python","source_language":"en","source_url":"https://github.com/opendatadiscovery/odd-models-package","tags":["open-data-discovery","data-models","pydantic","data-catalog"],"install":[{"cmd":"pip install odd-models","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Used for data class definitions","package":"attrs","optional":false},{"reason":"Date/time handling","package":"python-dateutil","optional":false},{"reason":"Validation and serialization","package":"pydantic","optional":false}],"imports":[{"note":"DataSet is in the models submodule","wrong":"from odd_models import DataSet","symbol":"DataSet","correct":"from odd_models.models import DataSet"},{"note":"","wrong":null,"symbol":"DataTransformer","correct":"from odd_models.models import DataTransformer"},{"note":"","wrong":null,"symbol":"DataSetField","correct":"from odd_models.models import DataSetField"},{"note":"","wrong":null,"symbol":"MetadataExtension","correct":"from odd_models.models import MetadataExtension"}],"quickstart":{"code":"from odd_models.models import DataSet, DataSetField, MetadataExtension\nimport datetime\n\n# Create a dataset\nfield = DataSetField(\n    odd_path='my_db.public.users.id',\n    name='id',\n    type='int64',\n    is_primary_key=True\n)\ndataset = DataSet(\n    odd_path='my_db.public.users',\n    name='users',\n    metadata=[MetadataExtension(metadata={'source': 'postgres'})],\n    fields_list=[field],\n    updated_at=datetime.datetime.now(datetime.timezone.utc)\n)\nprint(dataset)\n","lang":"python","description":"Create a basic DataSet entity with one field."},"warnings":[{"fix":"Use `from odd_models.models import DataSet`.","message":"In version 2.0, the package was restructured: imports changed from `odd_models` namespace to `odd_models.models`. Old imports (e.g., `from odd_models import DataSet`) will fail.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Ensure each odd_path string is globally unique.","message":"All `odd_path` fields must be unique across entities. Using duplicate values causes validation errors.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Migrate to DataSet and set `role` attribute accordingly.","message":"The `DataConsumer` and `DataProducer` models are deprecated as of 2.0. Use `DataSet` with appropriate role fields instead.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use: from odd_models.models import DataSet","cause":"Common mistake: importing from the top-level package instead of the models submodule.","error":"ImportError: cannot import name 'DataSet' from 'odd_models'"},{"fix":"Use one of the allowed enum values: bool, int32, int64, float, double, string, binary, timestamp, date, time, list, map, struct, union, null.","cause":"Providing an invalid type string for DataSetField.type.","error":"ValidationError: 1 validation error for DataSetField\ntype\n  value is not a valid enumeration member; permitted: 'bool', 'int32', 'int64', 'float', 'double', 'string', 'binary', 'timestamp', 'date', 'time', 'list', 'map', 'struct', 'union', 'null'"},{"fix":"Install the latest version: pip install --upgrade odd-models","cause":"Possible outdated installation; or the import path changed in version 2.0.","error":"AttributeError: module 'odd_models' has no attribute 'models'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}