MetallicPriest
MetallicPriest

Reputation: 30745

How can I see the location of an external Delta table in Spark using Spark SQL?

If I create an external table in Databricks, how can I check its location (in Delta lake) using an SQL query?

Upvotes: 3

Views: 12284

Answers (3)

jdhao
jdhao

Reputation: 28329

You can also use the following sql query to check the table location:

DESCRIBE TABLE EXTENDED <your-table-name>

See here for more details on using DESCRIBE.

Upvotes: 0

This can be done by using of multiple ways .

%sql 
show create table database.tablename

or

%sql 

desc formatted database.tablename

Upvotes: 5

MetallicPriest
MetallicPriest

Reputation: 30745

It can be done by using the following command.

describe detail <the table>

The location would be listed in the column location.

Upvotes: 8

Related Questions