{"record":{"id":"390b94269cf7d02f","repo":"mlflow/mlflow","slug":"dataset-association-operations-are-not-available-i","errorCode":null,"errorMessage":"Dataset association operations are not available in Databricks yet. Associations are managed through Unity Catalog.","messagePattern":"Dataset association operations are not available in Databricks yet\\. Associations are managed through Unity Catalog\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"mlflow/genai/datasets/__init__.py","lineNumber":702,"sourceCode":"    \"\"\"\n    if is_databricks_uri(get_tracking_uri()):\n        raise NotImplementedError(\n            \"Dataset tag operations are not available in Databricks yet. \"\n            \"Tags are managed through Unity Catalog.\"\n        )\n\n    from mlflow.tracking.client import MlflowClient\n\n    MlflowClient().delete_dataset_tag(dataset_id, key)\n\n\ndef _validate_association_operation():\n    \"\"\"Validate that dataset association operations can be performed.\"\"\"\n    from mlflow.store.tracking.file_store import FileStore\n    from mlflow.tracking._tracking_service.utils import _get_store\n\n    if is_databricks_uri(get_tracking_uri()):\n        raise NotImplementedError(\n            \"Dataset association operations are not available in Databricks yet. \"\n            \"Associations are managed through Unity Catalog.\"\n        )\n\n    store = _get_store()\n    if isinstance(store, FileStore):\n        raise NotImplementedError(\n            \"Dataset association operations are not supported with FileStore backend. \"\n            \"Please use a database-backed tracking store.\"\n        )\n\n\ndef add_dataset_to_experiments(dataset_id: str, experiment_ids: list[str]) -> \"EvaluationDataset\":\n    \"\"\"\n    Add a dataset to additional experiments.\n\n    This allows reusing datasets across multiple experiments for evaluation purposes.\n","sourceCodeStart":684,"sourceCodeEnd":720,"githubUrl":"https://github.com/mlflow/mlflow/blob/6a27f2decc0b76eb1b54af31849784addb357dbc/mlflow/genai/datasets/__init__.py#L684-L720","documentation":"_validate_association_operation rejects dataset<->experiment association operations (add_dataset_to_experiments / remove_dataset_from_experiments) on Databricks tracking URIs. Associations there are managed through Unity Catalog, so the MLflow-level API intentionally raises NotImplementedError.","triggerScenarios":"Calling mlflow.genai.datasets.add_dataset_to_experiments(...) or remove_dataset_from_experiments(...) while the tracking URI is databricks://.","commonSituations":"Wiring evaluation datasets to experiments inside a Databricks workspace; migrating OSS association scripts to Databricks.","solutions":["Associate datasets to experiments via Unity Catalog-managed mechanisms","Run association operations against an OSS database-backed tracking server","Branch on is_databricks_uri() to choose the right path"],"exampleFix":"// before\nadd_dataset_to_experiments(dataset_id=ds_id, experiment_ids=[exp_id])  # on Databricks\n// after\nif not is_databricks_uri(mlflow.get_tracking_uri()):\n    add_dataset_to_experiments(dataset_id=ds_id, experiment_ids=[exp_id])\nelse:\n    # manage associations via Unity Catalog","handlingStrategy":"validation","validationCode":"assert not is_databricks_uri(get_tracking_uri()), \"dataset associations must be managed via Unity Catalog on Databricks\"","typeGuard":null,"tryCatchPattern":"try:\n    mlflow.genai.datasets.add_dataset_to_experiments(ds_id, exp_ids)\nexcept NotImplementedError:\n    associate_via_uc(ds_id, exp_ids)","preventionTips":["Split Databricks and OSS dataset workflows","Check the tracking URI at pipeline start and choose the association path"],"tags":["databricks","genai","datasets","associations","not-implemented"],"backgroundTag":"databricks-unsupported-feature","analyzedSha":"6a27f2decc0b76eb1b54af31849784addb357dbc","analyzedAt":"2026-08-29T20:54:51.419Z","schemaVersion":2},"datasetVersion":"2026-08-29T22:17:34.462Z"}