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:ย 

Location not empty but not a Delta table

Distributed_Com
New Contributor III

I need help or insight regarding the following errors. My instructors (Brooke Wenig with Conor Murphy) ran this code successfully on our course video, but I cannot replicate what she did.

Here is the code and below it is the outcome from my Coursera course, workspace section 4.5 notebook:

CREATE DATABASE IF NOT EXISTS Databricks;

USE Databricks;

DROP TABLE IF EXISTS fireCallsDelta;

CREATE TABLE fireCallsDelta

USING DELTA

PARTITIONED BY (City)

AS 

 SELECT * FROM fireCallsParquet

(3) Spark Jobs

  • Job 3 View(Stages: 1/1)
  • Job 4 View(Stages: 1/1, 1 skipped)
  • Job 5 View(Stages: 1/1, 2 skipped)

Error in SQL statement: AnalysisException: Cannot create table ('`spark_catalog`.`databricks`.`fireCallsDelta`'). The associated location ('dbfs:/user/hive/warehouse/databricks.db/firecallsdelta') is not empty but it's not a Delta table

1 ACCEPTED SOLUTION

Accepted Solutions

dennyglee
Databricks Employee
Databricks Employee

The `fireCallsDelta` table already exists, and it appears it was created as a PARQUET table. A couple of options:

  1. DELETE the original Parquet table as a separate statement (i.e., in a separate cell so it can complete itself before any other jobs executing)
  2. Rename the table to something else if perhaps others are running the same demo.

View solution in original post

4 REPLIES 4

dennyglee
Databricks Employee
Databricks Employee

The `fireCallsDelta` table already exists, and it appears it was created as a PARQUET table. A couple of options:

  1. DELETE the original Parquet table as a separate statement (i.e., in a separate cell so it can complete itself before any other jobs executing)
  2. Rename the table to something else if perhaps others are running the same demo.

Thanks. Renaming table as you suggested allowed the query to run successfully.

Done. Thanks.

gilo12
New Contributor III

DELETE the original Parquet table as a separate statement

How can this be done? simple query "DROP TABLE .... " still failing with "cannot be found"

 

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