{"record":{"id":"9f6124841a50e945","repo":"mlflow/mlflow","slug":"tags-are-not-available-for-databricks-managed-data","errorCode":null,"errorMessage":"Tags are not available for Databricks managed datasets. Tags are managed through Unity Catalog. Use Unity Catalog APIs to manage dataset tags.","messagePattern":"Tags are not available for Databricks managed datasets\\. Tags are managed through Unity Catalog\\. Use Unity Catalog APIs to manage dataset tags\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"mlflow/genai/datasets/evaluation_dataset.py","lineNumber":191,"sourceCode":"\n    @property\n    def created_time(self) -> int | str | None:\n        \"\"\"The time the dataset was created.\"\"\"\n        if self._mlflow_dataset:\n            return self._mlflow_dataset.created_time\n        return self._databricks_dataset.create_time\n\n    @property\n    def create_time(self) -> int | str | None:\n        \"\"\"Alias for created_time (for backward compatibility with managed datasets).\"\"\"\n        return self.created_time\n\n    @property\n    def tags(self) -> dict[str, Any] | None:\n        \"\"\"The tags for the dataset (MLflow only).\"\"\"\n        if self._mlflow_dataset:\n            return self._mlflow_dataset.tags\n        raise NotImplementedError(\n            \"Tags are not available for Databricks managed datasets. \"\n            \"Tags are managed through Unity Catalog. Use Unity Catalog APIs to manage dataset tags.\"\n        )\n\n    @property\n    def experiment_ids(self) -> list[str]:\n        \"\"\"The experiment IDs associated with the dataset (MLflow only).\"\"\"\n        if self._mlflow_dataset:\n            return self._mlflow_dataset.experiment_ids\n        return self._databricks_dataset.experiment_ids\n\n    @property\n    def schema(self) -> str | None:\n        \"\"\"The schema of the dataset.\"\"\"\n        if self._mlflow_dataset:\n            return self._mlflow_dataset.schema\n        return self._databricks_dataset.schema if self._databricks_dataset else None\n","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/mlflow/mlflow/blob/6a27f2decc0b76eb1b54af31849784addb357dbc/mlflow/genai/datasets/evaluation_dataset.py#L173-L209","documentation":"The tags property is only implemented for MLflow-managed evaluation datasets. For Databricks-managed datasets, tags live in Unity Catalog, so MLflow raises NotImplementedError directing you to UC APIs. This prevents silently returning wrong or empty tag data.","triggerScenarios":"Reading .tags on an EvaluationDataset backed by a Databricks (UC-managed) dataset, e.g. ds = mlflow.genai.datasets.get_dataset(name=\"catalog.schema.x\"); ds.tags.","commonSituations":"Code that generically reads dataset tags for logging/audit across both MLflow and Databricks backends, or teams migrating from MLflow-native datasets to UC-managed ones.","solutions":["Manage and read tags via Unity Catalog APIs (e.g. ALTER TABLE ... SET TAGS in SQL, or the Databricks SDK's UC table tagging APIs)","Branch on the backend: only access .tags when the dataset is MLflow-managed","Store custom metadata outside the dataset (e.g. in an MLflow experiment tag keyed by dataset name) if UC tagging isn't available to you"],"exampleFix":"// before\ntags = eval_ds.tags  # NotImplementedError for Databricks datasets\n\n// after\nif eval_ds._mlflow_dataset:\n    tags = eval_ds.tags\nelse:\n    from databricks.sdk import WorkspaceClient\n    tags = WorkspaceClient().tables.get(eval_ds.name).securable_kind  # use UC tag APIs / SQL: SHOW TBLPROPERTIES","handlingStrategy":"validation","validationCode":"if eval_ds._databricks_dataset is not None:\n    # tags unavailable; use Unity Catalog tag APIs\n    from databricks.sdk import WorkspaceClient\n    tags = None  # or fetch via UC: SHOW TBLPROPERTIES / SDK","typeGuard":null,"tryCatchPattern":"try:\n    tags = eval_ds.tags\nexcept NotImplementedError:\n    tags = fetch_uc_tags(eval_ds.name)  # Unity Catalog tag lookup","preventionTips":["Never read .tags on Databricks-backed datasets; manage tags in Unity Catalog","Write backend-aware helpers that branch on _mlflow_dataset/_databricks_dataset","Document to your team that dataset tags live in UC, not MLflow"],"tags":["databricks","genai","tags","unity-catalog","not-implemented"],"backgroundTag":"unsupported-operation","analyzedSha":"6a27f2decc0b76eb1b54af31849784addb357dbc","analyzedAt":"2026-08-29T20:54:51.419Z","schemaVersion":2},"datasetVersion":"2026-08-29T22:17:34.462Z"}