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:ย 

UCX error with databricks labs ucx create-table-mapping

KurtWang
New Contributor

Hi,

I am using UCX for unity catalog migration and up to the step of table migration. When I run the command databricks labs ucx create-table-mapping, it returns the error message 'ERROR [src/databricks/labs/ucx.create-table-mapping] ValueError: Please run as account-admin: databricks labs ucx sync-workspace-info'.

Then I run databricks labs ucx sync-workspace-info, it says 'Error: entrypoint: login: invalid Databricks Account configuration'. 

My account is admin account in databricks, and I successfully run the databricks auth login to add my profile in .databrickscfg file. The profile is: host = https://mydatabrickshost.azuredatabricks.net/
auth_type = databricks-cli

Can anyone share some insight? Thanks

1 REPLY 1

mark_ott
Databricks Employee
Databricks Employee

You are seeing two related errors during table migration with Databricks Labs UCX for Unity Catalog:

  • For create-table-mapping:
    โ€œValueError: Please run as account-admin: databricks labs ucx sync-workspace-infoโ€

  • For sync-workspace-info:
    โ€œError: entrypoint: login: invalid Databricks Account configurationโ€

Below are possible causes and troubleshooting steps for your situation.

Administrative Permissions

Even if you are an admin within your Databricks workspace, UCX commands for Unity Catalog migration require Databricks Account Admin privileges at the account-level outside of just workspace admin. Double-check you are signed in as an account-level admin, not just a workspace admin.

Proper Databricks CLI Authentication

  • Unity Catalog and UCX require the newer Databricks CLI (version 0.200+) authentication using OAuth or personal access tokenโ€”never the legacy databricks-cli config method for Account-level APIs.

  • The following fields are required for account operations in your .databrickscfg profile:

  • If your current host is set as the workspace URL (*.azuredatabricks.net), you must switch to the account console URL for account-level operations.

Steps to Resolve

1. Create/OAuth Authenticate an Account Profile

2. Set the Profile for UCX

When running UCX, specify your account-level profile:

text
databricks labs ucx sync-workspace-info --profile <ACCOUNT_PROFILE_NAME>

Ensure you run commands with this profile, not the workspace-level profile.

3. Ensure Updated CLI and UCX Versions

  • Update Databricks CLI:

    text
    pip install --upgrade databricks-cli
  • Update Databricks Labs UCX:

    text
    pip install --upgrade databricks-labs-ucx

4. Validate Account Admin Role

Additional Notes

  • Only Account Admins can access workspace info needed for Unity Catalog migration.

  • Even if logged in as workspace admin, APIs for UCX migration require account-level permissions and configuration.

  • You may need to ask your Databricks administrator to grant you Account Admin privileges if your user is not configured properly.

If fixing the profile and permissions does not resolve it, consult the Databricks UCX docs or contact Databricks Support for more specific debugging.


References