Does DataBricks lock the file in Adls Gen 2 before writing (Append) to a file If yes then how can we fetch the file is locked

Akshith_Rajesh
New Contributor III

I have a requirement , I am running 2 Notebooks parallelly I want to overwrite the file parallelly .

If 2 Notebooks Try to overwrite the file at the same time , will I lose the data because of overwriting the file at the same time .

I want to overwrite the file by reading and appending some new rows and then overwrite.

How can we handle this situation