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: 

how to read delta table from the path?

andrew0117
Contributor

an unmanaged delta table is dropped and the real data still there. Now I'm trying to rebuild it, but don't know the schema. So, I tried: val myTable = DeltaTable.forPath("myPath"). But how can I get the data or schema out from myTable?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Hubert-Dudek
Esteemed Contributor III

or

SELECT * FROM `delta`./mypathtodeltafolder/;

View solution in original post

2 REPLIES 2

daniel_sahal
Esteemed Contributor

@andrew li​ 

df = spark.read.format("delta").load("/file_path")
df.printSchema()

Hubert-Dudek
Esteemed Contributor III

or

SELECT * FROM `delta`./mypathtodeltafolder/;

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