cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

implementing liquid clustering for DataFrames directly

luriveros
New Contributor

 

Hi !! I have a question is it possible to implementing liquid clustering for DataFrames directly saved to delta files (df.write.format("delta").save("path")), The conventional approach involving table creation
1 REPLY 1

brockb
New Contributor III
New Contributor III

Hi,
Hopefully this question is related to testing and any production data would get persisted to a table but one example is:

df = (
spark.range(10)
.write
.format("delta")
.mode("append")
.save("file:/tmp/data")
)

ALTER TABLE delta.`file:/tmp/data` CLUSTER BY (id);

DESC DETAIL delta.`file:/tmp/data`
OPTIMIZE delta.`file:/tmp/data`;
 
Thanks.
Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.