UCX error with databricks labs ucx create-table-mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 03:11 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2025 02:40 AM
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-cliconfig method for Account-level APIs. -
The following fields are required for account operations in your
.databrickscfgprofile:-
account_id -
host(should be the account URL, often in formhttps://accounts.azuredatabricks.net) -
auth_type -
token(if using token)
-
-
If your current
hostis 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
-
Login using new CLI syntax:
textdatabricks auth login --host https://accounts.azuredatabricks.netOr, for Azure:
textdatabricks auth login --host https://accounts.azuredatabricks.azure.com -
Choose OAuth and signin as Account Admin.
-
Confirm the profile contains
account_idand relevant host.
2. Set the Profile for UCX
When running UCX, specify your account-level profile:
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:
textpip install --upgrade databricks-cli -
Update Databricks Labs UCX:
textpip install --upgrade databricks-labs-ucx
4. Validate Account Admin Role
-
Go to the Databricks Account Console.
-
Under "Account Users", confirm your user is marked as "Account Admin".
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.