Forum Discussion

Shanshan533's avatar
Shanshan533
New Member
1 year ago
Solved

Issue with Delta Table Write in notebook

After writing to the Delta table, I noticed the data changed unexpectedly (see pictures below). I verified that the dataframe was correct before writing. Here’s the code used in the notebook:

 

 

df.write.format("delta").mode("overwrite").saveAsTable("properties")

 

 

 

 

Original dataframe Before Write:

Delta Table After Write:

 

 

  • Perhaps this is just because of the sorting order of the rows in the table?

     

    You can try to query the table and see if you find the rows.

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Shanshan533 ,

     

    Thanks for the reply from frithjof_v .

     

    Is my follow-up just to ask if the problem has been solved?

     

    If so, can you accept the correct answer as a solution or share your solution to help other members find it faster?

     

    Thank you very much for your cooperation!

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

2 Replies

  • frithjof_v's avatar
    frithjof_v
    Community Champion

    Perhaps this is just because of the sorting order of the rows in the table?

     

    You can try to query the table and see if you find the rows.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Shanshan533 ,

     

    Thanks for the reply from frithjof_v .

     

    Is my follow-up just to ask if the problem has been solved?

     

    If so, can you accept the correct answer as a solution or share your solution to help other members find it faster?

     

    Thank you very much for your cooperation!

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!