cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Unity Catalog metastore list is showing empty

RamaTeja
New Contributor II

Hi ,

I am not able to list the meta-stores in databricks cli using the below command :

databricks unity-catalog metastores list

{}

but when I tried databricks unity-catalog metastores get-summary I am able to get the meta-store info .

Can anyone help me why i am not able to list the meta-stores details even a meta store is assigned to the workspace

3 REPLIES 3

Kaniz
Community Manager
Community Manager

Hi @Rama Teja Reddy Damireddy​, The Databricks unity-catalog metastores list{} command lists the metadata stores configured for use with the Unity Catalog service in Databricks.

However, this command requires that you have the Unity Catalog service enabled in your Databricks workspace and that you have the necessary permissions to access the service.

What is the error message which you can see? We can only help you resolve this once you provide us with the error message.

RamaTeja
New Contributor II

Hi @Kaniz Fatma​ , Unity catalog is enabled in my workspace and i have been assigned metastore admin and account admin also.

databricks unity-catalog metastores list --debug

HTTP debugging enabled

send: b'GET /api/2.1/unity-catalog/metastores HTTP/1.1\r\nHost: adb-xxxxxxxx.azuredatabricks.net\r\nuser-agent: databricks-cli-0.17.3-unity-catalog-metastores-list-xxxx-***-***\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nAuthorization: Bearer xxxxxx\r\nContent-Type: text/json\r\n\r\n'

reply: 'HTTP/1.1 200 OK\r\n'

header: date: Fri, 24 Feb 2023 14:06:48 GMT

header: strict-transport-security: max-age=31536000; includeSubDomains; preload

header: x-content-type-options: nosniff

header: content-type: application/json

header: x-databricks-org-id: xxxxxx

header: content-encoding: gzip

header: vary: Accept-Encoding

header: server: databricks

header: transfer-encoding: chunked

{}

databricks unity-catalog metastores get-summary --debug

HTTP debugging enabled

send: b'GET /api/2.1/unity-catalog/metastore_summary HTTP/1.1\r\nHost: adb-xxxxxx.azuredatabricks.net\r\nuser-agent: databricks-cli-0.17.3-unity-catalog-metastores-get-summary-xxxxxx\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nAuthorization: Bearer xxxxx\r\nContent-Type: text/json\r\n\r\n'

reply: 'HTTP/1.1 200 OK\r\n'

header: date: Fri, 24 Feb 2023 14:09:38 GMT

header: strict-transport-security: max-age=31536000; includeSubDomains; preload

header: x-content-type-options: nosniff

header: content-type: application/json

header: x-databricks-org-id: xxxxx

header: content-encoding: gzip

header: vary: Accept-Encoding

header: server: databricks

header: transfer-encoding: chunked

{

 "metastore_id": "xxxxxxx",

 "name": "meta-gmf-unity",

 "default_data_access_config_id": "xxxx",

 "storage_root_credential_id": "xxxxx",

 "cloud": "azure",

 "region": "xxxx",

 "global_metastore_id": "azure:xxxxxxxxx",

 "storage_root_credential_name": "storage-credentials-name",

 "privilege_model_version": "1.0",

 "delta_sharing_scope": "INTERNAL_AND_EXTERNAL",

 "delta_sharing_recipient_token_lifetime_in_seconds": 15552000,

 "storage_root": "abfss://xxxxx",

 "owner": "xxxxx",

 "created_at": 1675680181865,

 "created_by": "it@anblicks.com",

 "updated_at": 1677049113454,

 "updated_by": "xxxx"

}

For get summary command i am able to get metastore details then when i tried list command why am i not able to list the metastores there.

Kaniz
Community Manager
Community Manager

Hi @Rama Teja Reddy Damireddy​, This indicates that there are no registered metastores in your Databricks workspace or you do not have permission to view them.

You may want to check your Databricks workspace configuration and permissions to ensure that the metastores are set up correctly and that you have the necessary access.

You can also try running the Databricks unity-catalog metastores create command to register a new metastore in your workspace and see if it appears in the list when you run databricks unity-catalog metastores list again.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.