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

Get the thrift hive.metastore.uri for Databricks unity catalog

Akshith_Rajesh
New Contributor III

I am trying to connect to Unity catalog meta store tables using Presto 
Based on the presto documentation I need to use the below configuration to connect to delta tables in the unity catalog 

https://prestodb.io/docs/current/connector/hive.html

So from where can I get the hive metastore.URI from data bricks 

connector.name=hive
hive.metastore.uri=thrift://localhost:9083
hive.s3.aws-access-key=<s3-access-key>
hive.s3.aws-secret-key=<s3-secret-key>

#Databricks #UnityCatalog

5 REPLIES 5

MathieuDB
Databricks Employee
Databricks Employee

Hello @Akshith_Rajesh,

In order to connect Trino to Unity Catalog HMS, please use this configuration instead:

hive.metastore.uri=https://<DATABRICKS_HOST>:443/api/2.0/unity-hms-proxy/metadata
hive.metastore.http.client.bearer-token=${ENV:DATABRICKS_TOKEN}
hive.metastore.http.client.additional-headers=X-Databricks-Catalog-Name:<DATABRICKS_UNITY_CATALOG_NAME>
hive.metastore.http.client.authentication.type=BEARER

n_mellal
New Contributor II

Hi @MathieuDB ,

Thanks for the tip. 
On Azure, France central, I'm getting 

failed: Error listing schemas for catalog catalog_dev: Error from Unity Catalog service: FEATURE_DISABLED: HMS compatibility with Unity Catalog is currently in private preview. For more information, please contact your Databricks representative.

Does it make sense to you ?

Best regards.

MathieuDB
Databricks Employee
Databricks Employee

Yes, this feature is still in Private Preview. Please contact your account manager and they will be able to enable this feature for you to test. You just need to share the workspace ids you want this feature enabled on.

Regards,
Mathieu

December
New Contributor II

Hi @MathieuDB

Currently, I have Unity Catalog in Databricks, which includes various types of data stored on Databricks and also data stored on AWS S3. I need to connect Trino and Databricks to query this data. I have a few questions about the configuration:

  1. To use this endpoint https://<DATABRICKS_HOST>:443/api/2.0/unity-hms-proxy/metadata, do I need to configure anything to enable it in Databricks? If so, how can I do it? Do you have any documentation on this?
  2. hive.metastore.http.client.bearer-token=${ENV:DATABRICKS_TOKEN} - Is this bearer token my personal access token?
  3. Besides using Unity Catalog HMS, is there any other way to connect Trino to Unity Catalog in Databricks?
  4. In order to read data stored on S3, do I need to configure anything else on Trino?

MathieuDB
Databricks Employee
Databricks Employee

Hello @December ,

You should contact your account team if you need more info on this feature which is not GA for the time being.

Another option would be to use Iceberg REST interface: https://medium.com/@flyws1993/oss-trino-to-read-tables-from-databricks-unity-catalog-90c203fde492

Hope it helps

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now