添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Databricks Community
hi all - I have created a data frame and would like to save in delta format using df.write.format("delta").saveAsTable("tablename") Its not working and throws " AnalysisException" . Please advise .

Hi @raghu maremanda​ ,

can you please share error details?

are you using PYTHON CELL to execute the code?

I am not sure right now if it's optional or mandatory, but you could add .mode() i.e:

df.write.format("delta").mode("append").saveAsTable("tablename")
append or overwrite

please refer to: https://docs.delta.io/latest/delta-batch.html#write-to-a-table

@raghu maremanda​ ,

you didn't add the .mode() in your code shown.

it's still:

d.write.format("delta").saveAsTable("delta.devices_new")

I am not sure if this will help, but try:

d.write.format("delta").mode("append").saveAsTable("devices_new")

also, the error doesn't tell much. can you share the error thrown?

thanks,

Pat.

Hi @raghu maremanda​​, It would mean a lot if you could select the " Best Answer " to help others find the correct answer faster.

This makes that answer appear right after the question, so it's easier to find within a thread.

It also helps us mark the question as answered so we can have more eyes helping others with unanswered questions.

Can I count on you?

If there isn’t a group near you, start one and help create a community that brings people together. Request a New Group Conditional Execution in DLT Pipeline based on the output in Data Engineering Facing Issue in Importing Delta Live Tables - Databricks Runtime 14.3 in Data Engineering Workspace Client dbutils issue in Data Engineering Delta sharing gold layer data within organisation but outside of Vnet in Administration & Architecture Delta sharing not working on tables with row filter or column mask in Data Governance © Databricks 2024. All rights reserved. Apache, Apache Spark, Spark and the Spark logo are trademarks of the Apache Software Foundation.
  • Privacy Notice
  • Terms of Use
  • Your Privacy Choices
  • Your California Privacy Rights
  •