cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

[DAB] registered_model aliases not being applied to Unity Catalog despite successful deploy

Direo
Contributor II

Hi

I'm experiencing an issue with Databricks Asset Bundles where model aliases defined in the bundle configuration are not being applied to Unity Catalog, even though the deployment succeeds and the Terraform state shows the aliases are set.

Environment:

  • Databricks CLI version: 0.277.0
  • Cloud: Azure
  • Unity Catalog enabled

Bundle configuration:

yaml
resources:
  registered_models:
    model_name:
      name: model_name
      catalog_name: catalog      schema_name: schema      comment: comment      aliases:
        - alias_name: staging          version_num: 1
      grants:
        - privileges:
            - MANAGE          principal: USERS

What I did:

  1. Model already existed in Unity Catalog with version 1
  2. Used databricks bundle deployment bind to link existing model to DAB
  3. Ran databricks bundle deploy
  4. Deploy completed successfully

In UI I see a new comment and permissions were set. However, UI shows no aliases on the model.

Expected behavior: Alias staging should be visible on the model pointing to version 1.
Actual behavior: Terraform state shows alias is configured, but it's not applied to the actual model in Unity Catalog.

Questions:

  1. Is this a known issue for registered_model aliases?
  2. Is there additional configuration required for aliases (Have tried setting catalog_name, schema_name, model_name. Could not set ID)?
4 REPLIES 4

Coffee77
Contributor III

Based on this info https://docs.databricks.com/api/workspace/registeredmodels/update#aliases and https://docs.databricks.com/api/workspace/registeredmodels/create#aliases you are using correct parameters. However, this is only a guess BUT I'd say issue comes from expected content in "id" or "version_num" parameters as it seems they are used in both create and update endpoints. So, unless someone from Databricks could confirm, only new additional action to attempt in the meantime is to fill those fields and try...

 


Lifelong Learner Cloud & Data Solution Architect | https://www.youtube.com/@CafeConData

Thanks @Coffee77 ! Have investigated it further by trying to set aliases using Terraform. The output is the same. I have looked at terraform documentation and it turns out that it does not support alias as of now. Databricks documentations, I guess, is misleading in this case.

Coffee77
Contributor III

Need to wait for fixing then...


Lifelong Learner Cloud & Data Solution Architect | https://www.youtube.com/@CafeConData

iyashk-DB
Databricks Employee
Databricks Employee

Can you try by explicitly adding:

databricks model-versions get-by-alias <catalog>.<schema>.<model> staging

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now