admin管理员组文章数量:1129047
Am trying to create a database on my mounted storage. I am following this course Azure Databricks & Spark For Data Engineers:Hands-on Project why does this code
%sql
CREATE DATABASE IF NOT EXISTS f1_demo
MANAGED LOCATION '/mnt/formula1dlbymilind/deltalake'
return me this error
UnityCatalogServiceException:
[RequestId=bc2af946-2461-456b-8565-f144d38155de ErrorClass=EXTERNAL_LOCATION_DOES_NOT_EXIST.RESOURCE_DOES_NOT_EXIST] External Location 'abfss://[email protected]/' does not exist.
even though i have mounted the storage and am trying to create a Database on it
When i did
%sql
CREATE DATABASE IF NOT EXISTS f1_demo
LOCATION '/mnt/formula1dlbymilind/deltalake'
It said
AnalysisException: CREATE SCHEMA in Unity Catalog must use MANAGED LOCATION, not LOCATION
Am trying to create a database on my mounted storage. I am following this course Azure Databricks & Spark For Data Engineers:Hands-on Project why does this code
%sql
CREATE DATABASE IF NOT EXISTS f1_demo
MANAGED LOCATION '/mnt/formula1dlbymilind/deltalake'
return me this error
UnityCatalogServiceException:
[RequestId=bc2af946-2461-456b-8565-f144d38155de ErrorClass=EXTERNAL_LOCATION_DOES_NOT_EXIST.RESOURCE_DOES_NOT_EXIST] External Location 'abfss://[email protected]/' does not exist.
even though i have mounted the storage and am trying to create a Database on it
When i did
%sql
CREATE DATABASE IF NOT EXISTS f1_demo
LOCATION '/mnt/formula1dlbymilind/deltalake'
It said
Share Improve this question edited Jan 8 at 12:41 jarlh 44.7k8 gold badges50 silver badges67 bronze badges asked Jan 8 at 12:31 Milind NairMilind Nair 111 bronze badge 2AnalysisException: CREATE SCHEMA in Unity Catalog must use MANAGED LOCATION, not LOCATION
- Very product specific, so I have removed the general ISO/ANSI <sql> tag. – jarlh Commented Jan 8 at 12:42
- check the location. if exists or not – JayashankarGS Commented Jan 9 at 3:24
1 Answer
Reset to default 0When you are creating schema in unity catalog you must use managed location passing external location.
If you observe here when i am using catalog jgsbricks
giving error. if you did not mention also, it automatically takes default catalog and gives error.
Next, if you want to create in unity catalog you need to create external location and use it.
Follow below steps.
Got Catalog > External data
Then click on Create external location
In next page give the details.
External location name : Location name
URL : Give the abfss
URL or select from dbfs mount location.
Storage credential : you either select the access connector already available when you created the workspace or you create new access connector
For both ways you need to give access to storage account by adding Storage Blob Data Contributor role to it.
I used existing access connector, then click on create.
Know run below query to create schema.
%sql
CREATE DATABASE IF NOT EXISTS jgsbricks.f1_demo
MANAGED LOCATION 'abfss://[email protected]/deltalake/'
Here you give full abfss url or mount point.
Output:
本文标签: azure data lakeUnable to create Tables in mounted Storage on DatabricksStack Overflow
版权声明:本文标题:azure data lake - Unable to create Tables in mounted Storage on Databricks - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736728594a1949867.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论