- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 08:15 PM
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2022 09:48 PM
Your code is not wrong, I tried and executed from my side and no error happens.
Could you check version of DBR?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 04:44 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 08:29 AM
Thank you for your response.
This is what I have so far -
d = spark.read.option("inferSchema" ,"true").option("delimeter" ,",").option("header","true").csv('dbfs:/FileStore/tables/Devices.csv')
d.write.format("delta").mode("append").saveAsTable("devices_new")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 01:50 PM
@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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2022 09:48 PM
Your code is not wrong, I tried and executed from my side and no error happens.
Could you check version of DBR?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022 01:01 PM
thank you for the response. db runtime was older. issue resolved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2022 06:28 AM
check your read cell, "Delimeter"

