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: 

Error Creating Table from delta location dbfs

vyasakhilesh
New Contributor
[UC_FILE_SCHEME_FOR_TABLE_CREATION_NOT_SUPPORTED] Creating table in Unity Catalog with file scheme dbfs is not supported. Instead, please create a federated data source connection using the CREATE CONNECTION command for the same table provider, then create a catalog based on the connection with a CREATE FOREIGN CATALOG command to reference the tables therein. SQLSTATE: 0AKUC
File <command-1426791046668810>, line 2 1 spark.sql("CREATE DATABASE IF NOT EXISTS AdventureWorks") ----> 2 spark.sql(f"""CREATE TABLE AdventureWorks.ProductsExternal 3 ( ProductID INT, 4 ProductName STRING, 5 Category STRING, 6 ListPrice FLOAT) 7 USING DELTA LOCATION 'dbfs:/{0}'""".format(delta_table_path)) 8 spark.sql("DESCRIBE EXTENDED AdventureWorks.ProductsExternal").show(truncate=False)
1 REPLY 1

agallard2
New Contributor III

Hi @vyasakhilesh,

The error you're seeing, [UC_FILE_SCHEME_FOR_TABLE_CREATION_NOT_SUPPORTED], occurs because Unity Catalog in Databricks does not support creating tables directly from DBFS (Databricks File System) locations.

In this case, you're trying to create a table in Unity Catalog using a DBFS path with USING DELTA LOCATION 'dbfs:/...', which Unity Catalog does not support.

Regards!


-------------------

Alfonso Gallardo

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