Search code examples
databricksdatabricks-unity-catalog

Create table in databricks


Im trying to create a table in databricks with this code:

USE CATALOG ${catalog};
    
CREATE SCHEMA IF NOT EXISTS ${personal.schema};
    
DROP TABLE IF EXISTS ${personal.schema}.${personal.source}_${personal.table};
    
CREATE TABLE IF NOT EXISTS ${personal.schema}.${personal.source}_${personal.table}
    USING PARQUET
    LOCATION 'abfss://${personal.schema}@${personal.storage_account_name}.dfs.core.windows.net/${personal.source}/${personal.table}/'
    OPTIONS(recursiveFileLookup = true);

But i get the error: Input path url overlaps with other external tables or volumes


Solution

  • This error says that you may already have table or Unity Catalog volume (in preview) that uses the same external location. You can use information schema tables (specifically the tables table) to check what tables could be overlapping with your location.