mlflow/mlflow · error · MlflowException
CreateLocation response did not include uc_table_prefix.
Error message
CreateLocation response did not include uc_table_prefix.
What it means
create_or_get_trace_location POSTs to the v5 CreateLocation endpoint and expects CreateLocation.Response to contain uc_table_prefix. When the returned proto lacks that field the store cannot construct the UnityCatalogEntity location and raises this MlflowException, meaning provisioning did not return the expected UC table prefix.
Source
Thrown at mlflow/store/tracking/databricks_rest_store.py:249
def create_or_get_trace_location(
self,
location: UnityCatalogEntity,
sql_warehouse_id: str | None = None,
) -> UnityCatalogEntity:
request_proto = CreateLocation(
uc_table_prefix=uc_table_prefix_location_to_proto(location),
sql_warehouse_id=self._resolve_sql_warehouse_id(sql_warehouse_id),
)
req_body = message_to_json(request_proto)
response_proto = self._call_endpoint(
CreateLocation,
req_body,
endpoint=_V5_TRACE_LOCATION_ENDPOINT,
response_proto=CreateLocation.Response(),
)
if response_proto.HasField("uc_table_prefix"):
return uc_table_prefix_location_from_proto(response_proto.uc_table_prefix)
raise MlflowException("CreateLocation response did not include uc_table_prefix.")
def link_trace_location(
self,
experiment_id: str,
location: UnityCatalogEntity,
) -> None:
request_proto = LinkTraceLocation(
experiment_id=experiment_id,
uc_table_prefix=uc_table_prefix_location_to_proto(location),
)
req_body = message_to_json(request_proto)
self._call_endpoint(
LinkTraceLocation,
req_body,
endpoint=f"/api/5.0/mlflow/experiments/{experiment_id}/trace-location:link",
response_proto=LinkTraceLocation.Response(),
)
_logger.debug(f"Linked experiment {experiment_id} to trace location: {location}")View on GitHub (pinned to 6a27f2decc)
Solutions
- Set MLFLOW_TRACING_SQL_WAREHOUSE_ID and ensure the warehouse is running before creating the location.
- Upgrade/align MLflow client and server versions that both support uc_table_prefix in CreateLocation responses.
- Check the created location in the Databricks workspace (Unity Catalog) to see whether the table was actually provisioned, then retry or clean up.
Defensive patterns
Strategy: try-catch
Try / catch
try:
loc = store.create_or_get_trace_location(location, sql_warehouse_id)
except MlflowException as e:
if "did not include uc_table_prefix" in str(e):
# retry after ensuring warehouse is running / versions aligned
ensure_warehouse_running(sql_warehouse_id)
loc = store.create_or_get_trace_location(location, sql_warehouse_id) Prevention
- Ensure the SQL warehouse exists and is running before provisioning.
- Set MLFLOW_TRACING_SQL_WAREHOUSE_ID up front.
- Align client/server MLflow versions before adopting v5 trace-location APIs.
When it happens
Trigger: Calling create_or_get_trace_location (or _create_or_get_trace_location) where the server's CreateLocation.Response arrives without uc_table_prefix set — e.g. warehouse not resolved/running, server doesn't support UC table prefixes for traces, or the create silently degraded.
Common situations: First-time provisioning of UC-backed tracing on a workspace with an older API; missing MLFLOW_TRACING_SQL_WAREHOUSE_ID causing a degraded create path; server/client MLflow version skew.
Related errors
- GetLocation response did not include uc_table_prefix.
- Got unexpected credential type {credential_type} when attemp
- Download failed: ${response.status} ${response.statusText}
- Trace data corrupted: invalid JSON - ${(parseError as Error)
- Failed to download trace data: ${String(error)}
AI-assisted analysis of mlflow/mlflow@6a27f2decc (2026-08-29).
Data as JSON: /api/errors/f239a4171a755208.
Report an issue: GitHub.