1.14 Registering a Model in the Unity Catalog Registry
Key Takeaways
- `mlflow.set_registry_uri("databricks-uc")` switches the client from the workspace registry to Unity Catalog; without it, a three-level name is rejected.
- Register inline with `log_model(..., registered_model_name="catalog.schema.model")`, or after the fact with `mlflow.register_model(model_uri, name)`.
- Models in Unity Catalog use the three-level namespace `catalog.schema.model_name`, so a model is discoverable and governable across every workspace on the metastore.
- Registering requires `USE CATALOG`, `USE SCHEMA`, and `CREATE MODEL` on the target schema; scoring requires only `EXECUTE` on the model.
- Unity Catalog registration requires a logged model signature, and it brings end-to-end lineage from source tables through the run to the serving endpoint.
1.14 Registering a Model in the Unity Catalog Registry
The transition from experimental machine learning to production requires rigorous model lifecycle governance. Organizations must maintain absolute traceability over which dataset version and code commit trained a model, who reviewed and approved it, and which specific model version is currently serving live production traffic.
Models in Unity Catalog integrate the MLflow Model Registry directly into Databricks' centralized governance framework. This architecture unifies model management under the standard 3-level namespace (catalog.schema.model_name), deprecating the legacy, workspace-confined Model Registry.
+---------------------------------------------------------------------------------------------------+
| MODELS IN UNITY CATALOG ARCHITECTURE |
+---------------------------------------------------------------------------------------------------+
| `prod_catalog` (Catalog: Environment Isolation) |
| | |
| +-- `fraud_detection` (Schema: Domain Grouping) |
| | |
| +-- `payment_risk_classifier` (Registered Model) |
| | |
| +-- Version 1 (Trained 2026-01-10) -> Tag: `status: deprecated` |
| +-- Version 2 (Trained 2026-02-15) -> Alias: `@champion` (Serving Live Traffic) |
| +-- Version 3 (Trained 2026-03-01) -> Alias: `@challenger` (Shadow Evaluation) |
+---------------------------------------------------------------------------------------------------+
Legacy Workspace Model Registry vs. Models in Unity Catalog
The Databricks ML certification heavily emphasizes the modernization from legacy workspace-scoped registries to Unity Catalog:
| Operational Feature | Legacy Workspace Model Registry | Models in Unity Catalog |
|---|---|---|
| Naming Namespace | 1-level / Flat string: model_name | 3-level namespace: catalog.schema.model_name |
| Scope of Governance | Restricted to a single workspace. Required cross-workspace syncing scripts. | Account-wide. Accessible across all authorized workspaces bound to the Unity Catalog metastore. |
| Deployment Lifecycle | Legacy Stages: None, Staging, Production, Archived. | Model Aliases: Mutable named references (e.g., @champion, @challenger, @prod). |
| Metadata & Annotations | Basic description text and key-value tags. | Rich Markdown documentation, Unity Catalog Tags, and audit logs. |
| Access Control (RBAC) | Workspace-level permissions (CAN READ, CAN MANAGE). | Standard SQL privileges: EXECUTE, READ_METADATA, APPLY_TAG, ALL PRIVILEGES. |
| Lineage Integration | Isolated to MLflow run metadata. | Full end-to-end data plane lineage (Bronze/Silver -> Feature Table -> Training Run -> Registered Model -> Serving Endpoint). |
Registering Models in Unity Catalog
Models can be registered in Unity Catalog using two primary programmatic methods:
Method 1: Inline Registration During Training (log_model)
import mlflow
import mlflow.sklearn
from sklearn.ensemble import RandomForestClassifier
# Configure active registry destination to Unity Catalog
mlflow.set_registry_uri("databricks-uc")
full_model_name = "prod_catalog.fraud_detection.payment_risk_classifier"
with mlflow.start_run(run_name="rf_production_candidate") as run:
model = RandomForestClassifier(n_estimators=150, max_depth=8)
model.fit(X_train, y_train)
# Log and register model in a single atomic operation
mlflow.sklearn.log_model(
sk_model=model,
artifact_path="model",
registered_model_name=full_model_name,
input_example=X_train.iloc[:5]
)
Method 2: Registering an Existing Run Artifact (register_model)
from mlflow.tracking import MlflowClient
client = MlflowClient()
run_id = "3a8f1b2c4d5e6f7a8b9c0d1e2f3a4b5c"
model_uri = f"runs:/{run_id}/model"
# Register existing run artifact to Unity Catalog 3-level model name
model_version = mlflow.register_model(
model_uri=model_uri,
name="prod_catalog.fraud_detection.payment_risk_classifier"
)
print(f"Successfully created Model Version: {model_version.version}")
Prerequisites the Exam Tests
Registration into Unity Catalog fails for predictable reasons, and each one is a plausible distractor:
| Requirement | Why | Symptom when missing |
|---|---|---|
mlflow.set_registry_uri("databricks-uc") | Directs the client at the Unity Catalog registry rather than the workspace registry | A three-level name is treated as a literal model name in the workspace registry |
Three-level name catalog.schema.model | Unity Catalog namespace | Rejected as an invalid name |
USE CATALOG + USE SCHEMA + CREATE MODEL on the target schema | Registration creates an object in that schema | Permission denied |
| A logged model signature | Unity Catalog requires the input/output schema for governance and serving | Registration is rejected — log with signature=infer_signature(...) |
| MLflow client version that supports UC models | Three-level naming was added alongside Models in Unity Catalog | Client-side name validation error |
Privileges: Registering vs. Consuming
Two different roles need two different grants, and mixing them up is a common exam distractor:
-- The training job needs to create versions
GRANT USE CATALOG ON CATALOG prod_catalog TO `sp-training-job`;
GRANT USE SCHEMA ON SCHEMA prod_catalog.fraud_detection TO `sp-training-job`;
GRANT CREATE MODEL ON SCHEMA prod_catalog.fraud_detection TO `sp-training-job`;
-- The batch scoring job only needs to load and score
GRANT EXECUTE ON MODEL prod_catalog.fraud_detection.payment_risk_classifier
TO `sp-batch-inference-runner`;
EXECUTE is the privilege that permits mlflow.pyfunc.load_model,
mlflow.pyfunc.spark_udf, and Model Serving to use the model. It does not permit
creating new versions or reassigning aliases.
Access Control and Permissions in Unity Catalog
Unity Catalog enforces role-based access control (RBAC) on registered models via standard SQL:
| Privilege | Permitted User Action |
|---|---|
EXECUTE | Allows users or serving endpoints to load the model and score predictions (load_model, spark_udf, Real-Time Serving). |
READ_METADATA | Allows users to view model details, lineage, versions, aliases, and tags in the UI/API without loading model weights. |
APPLY_TAG | Allows users or CI/CD pipelines to attach metadata tags to models and versions. |
ALL PRIVILEGES | Full administrative control (create versions, set aliases, rename, delete model). |
-- Grant scoring permission to production service principal
GRANT EXECUTE ON MODEL prod_catalog.fraud_detection.payment_risk_classifier
TO `sp-batch-inference-runner`;
-- Grant read-only exploration access to junior analysts
GRANT READ_METADATA ON MODEL prod_catalog.fraud_detection.payment_risk_classifier
TO `junior-analysts`;
Which of the following represents the correct format for registering and loading a model governed under Unity Catalog?
Which Unity Catalog SQL privilege is specifically required for an automated batch scoring pipeline to load a registered model and generate predictions?
An engineer calls mlflow.register_model(model_uri, name='prod_catalog.ml.churn') in a fresh notebook and the call fails with an invalid-name error. What is the most likely omission?