cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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

Accepted Solutions

Atanu
Databricks Employee
Databricks Employee
4 REPLIES 4

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

Atanu
Databricks Employee
Databricks Employee

LukaszJ
Contributor III

Thank you for the answer.

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

Best regards,

Łukasz

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

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