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/;

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!