cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Governance
Join discussions on data governance practices, compliance, and security within the Databricks Community. Exchange strategies and insights to ensure data integrity and regulatory compliance.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to edit the bucket path for the Unity Catalog metastore when it is set up later

tyorisoo
New Contributor II

How to edit the bucket path for the Unity Catalog metastore when it is set up later
Registered on 2024/10 from AWS marketplace.
We have created a customer management VPC and manually created the workspace.
I create S3 for metastore storage from workspace external location creation and set S3 path from account console.

Is there any way to change the bucket path and associated credentials?


Here is what we have tried
I could not edit the bucket from an external location.
I was able to modify another IAM role credentials, though,
The metastore screen of the account console did not reflect the changed IAM role.

9 REPLIES 9

NandiniN
Databricks Employee
Databricks Employee

Hi @tyorisoo ,

Editing the Bucket Path for Unity Catalog Metastore

To edit the bucket path for the Unity Catalog metastore, follow these steps:

  1. Prerequisites:

    • Ensure you have the necessary permissions to manage the metastore and the associated S3 bucket.
  2. Update the S3 Path:

    • You cannot directly edit the bucket path from an external location. Instead, you need to update the metastore configuration.
  3. Modify IAM Role Credentials:

    • If you need to change the IAM role credentials, you can do so, but ensure that the new IAM role has the necessary permissions to access the new S3 bucket path.
  4. Update Metastore Configuration:

    • Use the Account Console or the Databricks API to update the metastore configuration with the new S3 bucket path and IAM role credentials.

tyorisoo
New Contributor II

Thank you.
What I was trying to explain is that, like this document(https://docs.databricks.com/ja/data-governance/unity-catalog/create-metastore.html)
External location (created manually), register your credentials and
after creating the S3 bucket from the account console,
I wanted to know how to edit it after creating the S3 bucket from the account console.

Can I edit the following after setting up as attached?
ใƒปchange the bucket path
ใƒปCan the edited contents be reflected in the same IAM role?
ใƒปChange to a newly created IAM role

Here is what we have tried
ใƒปI could not edit the bucket from an external location.
ใƒปI was able to modify another IAM role credentials, though,
ใƒปThe metastore screen of the account console did not reflect the changed IAM role.

tyorisoo
New Contributor II

@NandiniN
Sorry, I hope you are seeing this reply.

NandiniN
Databricks Employee
Databricks Employee

Sorry @tyorisoo , I was not able to change the bucket. I will ask on of my team mates to review this and update here. Thanks!

NandiniN
Databricks Employee
Databricks Employee

Is it however possible for you to create a new external location with the desired bucket path.

And for the metadata update - You should be able to modify the IAM role credentials https://docs.databricks.com/en/connect/unity-catalog/storage-credentials.html#step-3-update-the-iam-... as long as you have the sufficient permissions. Ideally changes should be reflected immediately, but it also could be a cache issue hence try to refresh/re-save the changes and review the logs.

NandiniN
Databricks Employee
Databricks Employee

So @tyorisoo , I was able to check with one of my team mates. Only if you are an owner of the location, it can be edited, otherwise you ll have a to create a new one as I suggested earlier - create a new external location with the desired bucket path.

image (5).png

tyorisoo
New Contributor II

@NandiniN
Thanks for the reply.

 I was able to check with one of my team mates. Only if you are an owner of the location, it can be edited, otherwise you ll have a to create a new one as I suggested earlier

I also created the external location.
Am I correct in that I can edit the path to an already created external location for the unitycatalog metastore?

What I want to know is on the account console screen of the captcha.
Metastore Settings.
How do I edit an already created external location for the unitycatalog metastore to change its path and role?

NandiniN
Databricks Employee
Databricks Employee

Can you please try this - 

-- Update the external location path
ALTER EXTERNAL LOCATION my_external_location
SET URL 's3://new-bucket/new-path';

-- Update the storage credential role
ALTER STORAGE CREDENTIAL my_storage_credential
SET IAM_ROLE 'arn:aws:iam::123456789012:role/new-role';

NandiniN
Databricks Employee
Databricks Employee

Okay on carefully reviewing your image, doc and my internal repro

You cannot modify this path once you set it.

https://docs.databricks.com/en/data-governance/unity-catalog/manage-metastore.html#step-3-add-the-st...

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group