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

Terraform: get metastore id without creating new metastore

LukaszJ
Contributor III

Hello,

I want to create database (schema) and tables in my Databricks workspace using terraform.

I found this resources: databricks_schema

It requires databricks_catalog, which requires metastore_id.

However, I have databricks_workspace and I did not create any metastore and everything works fine. So how can I get metastore_id without creating a new mestastore, or how can I create databricks_schema (database) other way?

Best regards,

Łukasz

1 ACCEPTED SOLUTION
6 REPLIES 6

Hubert-Dudek
Esteemed Contributor III

@Łukasz Jaremek​ , Strange with that id. For example from databricks cluster log you can get some info about metastore but not id... (maybe url can be used instead?)

example from log:

22/03/14 05:40:38 INFO MetastoreMonitor$: Internal internal metastore configured (config=DbMetastoreConfig{host=consolidated-westeurope-prod-metastore-addl-3.mysql.database.azure.com, port=3306, dbName=organization34353553, user=LoBp1K7HeU3FvyzM@consolidated-westeurope-prod-metastore-addl-3})
22/03/14 05:40:38 INFO DatabricksILoop$: Creating throwaway interpreter
22/03/14 05:40:38 INFO DataSourceFactory$: DataSource Jdbc URL: jdbc:mariadb://consolidated-westeurope-prod-metastore-addl-3.mysql.database.azure.com:3306/organization34353553?useSSL=true&sslMode=VERIFY_CA&disableSslHostnameVerification=true&trustServerCertificate=false&serverSslCert=/databricks/common/mysql-ssl-ca-cert.crt

LukaszJ
Contributor III

Thank you for the answer.

Yes, that's probably it. I have to read about the UC.

Best regards,

Łukasz

Kaniz
Community Manager
Community Manager

Hi @Łukasz Jaremek​ , Just a friendly follow-up. Do you still need help, or @Hubert Dudek (Customer)​ and @Atanu Sarkar​ 's response help you to find the solution? Please let us know.

LukaszJ
Contributor III

Hello @Kaniz Fatma​ , thank you for your interest.

I think @Atanu Sarkar​ solved my problem.

I'm sorry for the lack of response.

Best reagards,

Łukasz

Kaniz
Community Manager
Community Manager

Hi @Łukasz Jaremek​ , Thank you for the update. Appreciate your friendly response. Thank you for choosing the best answer for community.

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.