user12823830
user12823830

Reputation:

Creating database in Azure databricks on External Blob Storage giving error

I have mapped my blob storage to dbfs:/mnt/ under name /mnt/deltalake and blob storage container name is deltalake.

Mounting to Dbfs is done using Azure KeyVault backed secret scope.

When I try to create a database using CREATE DATABASE abc with location '/mnt/deltalake/databases/abc' this errors out saying path does not exist.

However when I was using the dbfs path as storage by using .. CREATE DATABASE abc with location '/user/hive/warehouse/databases/abc' .. it was always successful.

Wonder what is going wrong . Suggestions please.

Upvotes: 1

Views: 644

Answers (1)

Smurphy0000
Smurphy0000

Reputation: 76

Using a mount point, you should be able to access existing files or write new files through databricks.

However, I believe the SQL commands, such as CREATE DATABASE, only work on the underlying hive metastore.

You may need to create a database for your blob storage outside of databricks, and then connect to the database to read and write from it using databricks.

Upvotes: 0

Related Questions