Hi there,
I am trying to use upload_data() function to overwrite a file in ADLS GEN2 storage file share. But it is throwing me error as below.
Below are the imported libraries
from azure.storage.filedatalake import DataLakeServiceClient
from azure.identity import ClientSecretCredential
Below is the piece of code trying to over write
file_client = datalake_service.get_file_client(file_system="c/Property",file_path="cities1.txt")
local_file = open("new.csv",'r')
file_contents = local_file.read()
file_client.upload_data(file_contents, overwrite=False)
Error received
HttpResponseError: (ConditionNotMet) The condition specified using HTTP conditional header(s) is not met.
RequestId:1585fe0d-@@@@@@@@@
Time:2021-05-24T15:41:47.6732655Z
Code: ConditionNotMet
Message: The condition specified using HTTP conditional header(s) is not met.
RequestId:1585fe0d@@@@@@@@@@
Time:2021-05-24T15:41:47.6732655Z
Please help me to solve this issue.
Thanks,