[BUG]: create-catalogs-schemas fail if the location provided has more than 1 level nesting than the external location
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
I run databricks labs ucx create-catalogs-schemas and provide s3://mohanatest/data/catalog/workspace_1961346165534048 as the managed storage location for a catalog. I have an external location for s3://mohanatest/.
The command fails with ERROR [d.l.ucx.create-catalogs-schemas] NotFound: Failed to validate location for workspace_1961346165534048 catalog.
Expected Behavior
The catalog should get created as the existing external location works for the location provided.
But the current code only works for 1 level of nesting. Since I am providing 3 level of nesting sub-directories, it fails.
For example, location s3://mohanatest/data will work, but location s3://mohanatest/data/catalog fails. Ideally, both should succeed.
Steps To Reproduce
- Create external location for
s3://mohanatest/ - Run
databricks labs ucx create-catalogs-schemas - Enter
s3://mohanatest/data/catalog/workspace_1961346165534048when prompted with "Please provide storage location url for catalog:workspace_1961346165534048."
Cloud
AWS
Operating System
macOS
Version
latest via Databricks CLI
Relevant log output
No response
Added a pull request https://github.com/databrickslabs/ucx/pull/1701 for fixing this