- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2022 11:41 AM
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
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
- Labels:
-
Delta
-
Delta table
-
SQL
-
TABLE IF EXISTS
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2022 09:56 PM
The `fireCallsDelta` table already exists, and it appears it was created as a PARQUET table. A couple of options:
- 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)
- Rename the table to something else if perhaps others are running the same demo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2022 09:56 PM
The `fireCallsDelta` table already exists, and it appears it was created as a PARQUET table. A couple of options:
- 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)
- Rename the table to something else if perhaps others are running the same demo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 06:53 AM
Thanks. Renaming table as you suggested allowed the query to run successfully.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 06:54 AM
Done. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 10:44 AM
DELETE the original Parquet table as a separate statement
How can this be done? simple query "DROP TABLE .... " still failing with "cannot be found"

