Azure Synapse Unable to drop created table

Ong Jing Long 1 Reputation point
2022-02-23T01:51:50.747+00:00

I have created a table in the synapse notebook using the following method.

path = "synfs:/{}{}/".format(jobId,mountPoint)
spark.sql(f"CREATE TABLE test_table USING DELTA LOCATION '{path}'")

and a table named test_table is created under this section.
177051-image.png

However, once the session closes, and a new session is started, I realised that the path used to create this test_table would not exist since the path is specific to the previous session due to the jobId and mount.
java.util.concurrent.ExecutionException: org.apache.hadoop.fs.PathNotFoundException:

Tried dropping the table using spark.sql("DROP TABLE IF EXISTS test_table ") but that didn't work either.

Are there other ways to drop this table?

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,671 questions
{count} votes